Skip to content

Commit

Permalink
Make the port the client proxy proxies to configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianKniephoff committed May 6, 2024
1 parent e9331c5 commit 71ea051
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/setupProxy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { createProxyMiddleware } = require("http-proxy-middleware");

const port = process.env.PROXY_PORT || 5000;

module.exports = function (app) {
app.use(
[
Expand All @@ -13,7 +15,7 @@ module.exports = function (app) {
"/j_spring_security_check",
],
createProxyMiddleware({
target: "http://localhost:5000",
target: `http://localhost:${port}`,
changeOrigin: true,
})
);
Expand Down

0 comments on commit 71ea051

Please sign in to comment.