Spaces:
Runtime error
Runtime error
Download frontend/src/setupProxy.js from SpacesExamples/fastapi-react-app: direct link, hf CLI and curl.
- Browser
- Download file 332 Bytes
-
https://huggingface.co/spaces/SpacesExamples/fastapi-react-app/resolve/refs%2Fpr%2F1/frontend/src/setupProxy.js
- Command line
-
hf download hf://spaces/SpacesExamples/fastapi-react-app@refs/pr/1/frontend/src/setupProxy.js
-
curl -L -o setupProxy.js https://huggingface.co/spaces/SpacesExamples/fastapi-react-app/resolve/refs%2Fpr%2F1/frontend/src/setupProxy.js
332 Bytes
| const { createProxyMiddleware } = require('http-proxy-middleware'); | |
| module.exports = function (app) { | |
| app.use( | |
| '/api', | |
| createProxyMiddleware({ | |
| pathRewrite: { | |
| '^/api': '', | |
| }, | |
| target: 'http://localhost:7860', | |
| changeOrigin: true, | |
| }) | |
| ); | |
| }; |