Skip to content

Commit

Permalink
fix(studio): proxy redirect (#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
allardy committed Feb 21, 2022
1 parent b79ebef commit 568ed32
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/studio-be/src/core/app/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,14 @@ export class HTTPServer {
target,
changeOrigin: true,
logLevel: 'silent',
onProxyReq: fixRequestBody
onProxyReq: (proxyReq, req) => {
// Prevent redirecting studio URL to the main process
if (req.originalUrl.includes('/studio')) {
proxyReq.abort()
}

return fixRequestBody(proxyReq, req)
}
})
)
}
Expand Down

0 comments on commit 568ed32

Please sign in to comment.