mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
016633dae9
* refactor: fix deprecated prettier config name * refactor: add fmt scripts * refactor: check fmt during CI * refactor: format files
28 lines
599 B
JavaScript
28 lines
599 B
JavaScript
const { createProxyMiddleware } = require('http-proxy-middleware');
|
|
|
|
const API_URL = process.env.UNLEASH_API || 'http://localhost:4242';
|
|
|
|
module.exports = function (app) {
|
|
app.use(
|
|
'/api',
|
|
createProxyMiddleware({
|
|
target: API_URL,
|
|
changeOrigin: true,
|
|
})
|
|
);
|
|
app.use(
|
|
'/auth',
|
|
createProxyMiddleware({
|
|
target: API_URL,
|
|
changeOrigin: true,
|
|
})
|
|
);
|
|
app.use(
|
|
'/logout',
|
|
createProxyMiddleware({
|
|
target: API_URL,
|
|
changeOrigin: true,
|
|
})
|
|
);
|
|
};
|