1
0
mirror of https://github.com/bitwarden/web synced 2025-12-10 21:33:16 +00:00
Files
web/proxy.config.js
2022-01-25 20:06:29 +01:00

34 lines
772 B
JavaScript

const config = require("./config.js");
const ENV = process.env.ENV == null ? "development" : process.env.ENV;
const envConfig = config.load(ENV);
config.log(envConfig);
module.exports = {
"/api": {
target: envConfig.dev?.proxyApi,
pathRewrite: { "^/api": "" },
secure: false,
changeOrigin: true,
},
"/identity": {
target: envConfig.dev?.proxyIdentity,
pathRewrite: { "^/identity": "" },
secure: false,
changeOrigin: true,
},
"/events": {
target: envConfig.dev?.proxyEvents,
pathRewrite: { "^/events": "" },
secure: false,
changeOrigin: true,
},
"/notifications": {
target: envConfig.dev?.proxyNotifications,
pathRewrite: { "^/notifications": "" },
secure: false,
changeOrigin: true,
},
};