From 65a629b97a2e913e1ed7000e3b618737c6f564d7 Mon Sep 17 00:00:00 2001 From: Florent MILLOT <75525996+flomillot@users.noreply.github.com> Date: Wed, 22 Oct 2025 14:48:26 +0200 Subject: [PATCH] Refactor `rewrite` function in Vite proxy config to use consistent parameter name Signed-off-by: Florent MILLOT <75525996+flomillot@users.noreply.github.com> --- vite.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index 06de9f6..a2ed5c3 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -18,11 +18,11 @@ const serverSettings: CommonServerOptions = { proxy: { '/api/gateway': { target: 'http://localhost:9000', - rewrite: (path: string) => path.replace(/^\/api\/gateway/, ''), + rewrite: (url: string) => url.replace(/^\/api\/gateway/, ''), }, '/ws/gateway': { target: 'http://localhost:9000', - rewrite: (path: string) => path.replace(/^\/ws\/gateway/, ''), + rewrite: (url: string) => url.replace(/^\/ws\/gateway/, ''), ws: true, }, },