mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
quick proxy test
This commit is contained in:
15
interface/src/setupProxy.js
Normal file
15
interface/src/setupProxy.js
Normal file
@@ -0,0 +1,15 @@
|
||||
const createProxyMiddleware = require('http-proxy-middleware');
|
||||
|
||||
module.exports = function (app) {
|
||||
app.use(
|
||||
'/rest/*',
|
||||
createProxyMiddleware({
|
||||
target: 'http://localhost:3080',
|
||||
secure: false,
|
||||
changeOrigin: true,
|
||||
// pathRewrite: {
|
||||
// '^/api/settings': '/api/app/settings'
|
||||
// },
|
||||
})
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user