Spaces:
Sleeping
Sleeping
Download frontend/src/setupProxy.js from alfalmi/react_fastapi: direct link, hf CLI and curl.
- Browser
- Download file 332 Bytes
-
https://huggingface.co/spaces/alfalmi/react_fastapi/resolve/main/frontend/src/setupProxy.js
- Command line
-
hf download hf://spaces/alfalmi/react_fastapi/frontend/src/setupProxy.js
-
curl -L -o setupProxy.js https://huggingface.co/spaces/alfalmi/react_fastapi/resolve/main/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, | |
| }) | |
| ); | |
| }; |