From b9e1f76d94fa0166e68dbc678a3d45c69e174e75 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Sat, 6 Dec 2025 21:21:48 +0000 Subject: [PATCH] Updated Vite config to allow all hosts, and proxy reset links to backend. --- frontend/vite.config.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/frontend/vite.config.js b/frontend/vite.config.js index c1c0563..1aca842 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -53,18 +53,26 @@ export default defineConfig(({ command }) => ({ base: '/', server: { port: 4403, + allowedHosts: true, fs: { allow: ['..'] }, proxy: { // Only proxy these two specific backend API paths '/auth/api': { - target: 'http://localhost:4402', - headers: { connection: 'close' } + target: 'http://localhost:4402' }, '/auth/ws': { target: 'http://localhost:4402', ws: true + }, + // Passphrase links: /auth/word1.word2.word3.word4.word5 + '^/auth/[a-z]+\\.[a-z]+\\.[a-z]+\\.[a-z]+\\.[a-z]+$': { + target: 'http://localhost:4402' + }, + // Passphrase links: /word1.word2.word3.word4.word5 + '^/[a-z]+\\.[a-z]+\\.[a-z]+\\.[a-z]+\\.[a-z]+$': { + target: 'http://localhost:4402' } } },