fix(proxy): restrict proxy to exact /api routes only (#3456)
This commit is contained in:
parent
cfe2061322
commit
8466e1a0b0
|
|
@ -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
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue