Skip to content

Commit 9989a70

Browse files
committed
proxy handler just for api and auth routes
Former-commit-id: c49800a4c55833c257d0bcc4603d9ca272b63c9e
1 parent e940020 commit 9989a70

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

webui/src/setupProxy.js

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

33
module.exports = function(app) {
4-
app.use('/', createProxyMiddleware({
4+
const handler = createProxyMiddleware({
55
target: 'http://localhost:8000',
66
changeOrigin: true,
7-
}))
7+
});
8+
app.use('/api', handler)
9+
app.use('/auth', handler)
810
};

0 commit comments

Comments
 (0)