frontend/src/setupProxy.js
2021-03-11 14:37:30 +08:00

20 lines
425 B
JavaScript

/* eslint-disable @typescript-eslint/no-var-requires */
const proxy = require("http-proxy-middleware");
module.exports = function (app) {
app.use(
"/api",
proxy({
target: "http://localhost:5212",
changeOrigin: true,
})
);
app.use(
"/custom",
proxy({
target: "http://localhost:5212",
changeOrigin: true,
})
);
};