Updated Vite config to allow all hosts, and proxy reset links to backend.

This commit is contained in:
Leo Vasanko
2025-12-06 21:21:48 +00:00
parent eead72f053
commit b9e1f76d94
+10 -2
View File
@@ -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'
}
}
},