Skip to content

Commit

Permalink
fix(proxy): restrict proxy to exact /api routes only (#3456)
Browse files Browse the repository at this point in the history
  • Loading branch information
khakanali authored Nov 7, 2024
1 parent cfe2061 commit 8466e1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ui/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default defineConfig(async ({ mode }) => {
const serverPort = parseInt(serverEnv?.['PORT'] ?? 3000)
if (!Number.isNaN(serverPort) && serverPort > 0 && serverPort < 65535) {
proxy = {
'/api': {
'^/api(/|$).*': {
target: `http://${serverHost}:${serverPort}`,
changeOrigin: true
},
Expand Down

0 comments on commit 8466e1a

Please sign in to comment.