Skip to content

Commit cfe381f

Browse files
authored
Refactor rewrite function in Vite proxy config to use consistent parameter name (#3404)
Signed-off-by: Florent MILLOT <[email protected]>
1 parent 4e71f2b commit cfe381f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vite.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ const serverSettings: CommonServerOptions = {
1717
proxy: {
1818
'/api/gateway': {
1919
target: 'http://localhost:9000',
20-
rewrite: (path: string) => path.replace(/^\/api\/gateway/, ''),
20+
rewrite: (url: string) => url.replace(/^\/api\/gateway/, ''),
2121
},
2222
'/ws/gateway': {
2323
target: 'http://localhost:9000',
24-
rewrite: (path: string) => path.replace(/^\/ws\/gateway/, ''),
24+
rewrite: (url: string) => url.replace(/^\/ws\/gateway/, ''),
2525
ws: true,
2626
},
2727
},

0 commit comments

Comments
 (0)