Skip to content

Commit 182109c

Browse files
author
Dan Kelley
committed
not sure if required, changeOrigin allows your host target to be different from current environment
1 parent eb0e4e1 commit 182109c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/client/src/setupProxy.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
const proxy = require('http-proxy-middleware');
22

3-
43
module.exports = function(app) {
54
app.use(proxy('/api/**', {
6-
target: process.env.IS_LOCAL === 'true' ? 'http://localhost:3333' : 'http://server:5000'
5+
target: process.env.IS_LOCAL === 'true' ? 'http://localhost:3333' : 'http://server:5000',
6+
changeOrigin: true,
77
}
88
));
99
}

0 commit comments

Comments
 (0)