Skip to content

Commit

Permalink
mod: server proxy (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolaCage authored Jul 6, 2022
1 parent 54d87eb commit 84f8dd0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,22 @@ app.get('/api/app', (_req, res) => {
})
});

app.use('/api-graph/*', createProxyMiddleware({
target: getTargetUrl(proxy.graph.target),
pathRewrite: {
'/api-graph': '/',
},
changeOrigin: true,
}));

app.use('/api-storage/*', createProxyMiddleware({
target: getTargetUrl(proxy.storage.target),
pathRewrite: {
'/api-storage': '/',
},
changeOrigin: true,
}));

app.get('/api/config/custom', async (_req, res) => {
if (nebulaServer) {
res.send({
Expand Down

0 comments on commit 84f8dd0

Please sign in to comment.