diff options
Diffstat (limited to 'subprojects/frontend/config/detectDevModeOptions.ts')
-rw-r--r-- | subprojects/frontend/config/detectDevModeOptions.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/subprojects/frontend/config/detectDevModeOptions.ts b/subprojects/frontend/config/detectDevModeOptions.ts index 6052e047..7a3de4cb 100644 --- a/subprojects/frontend/config/detectDevModeOptions.ts +++ b/subprojects/frontend/config/detectDevModeOptions.ts | |||
@@ -63,6 +63,11 @@ export default function detectDevModeOptions(): DevModeOptions { | |||
63 | const api = detectListenOptions('API', '127.0.0.1', 1312); | 63 | const api = detectListenOptions('API', '127.0.0.1', 1312); |
64 | const publicAddress = detectListenOptions('PUBLIC', listen.host, listen.port); | 64 | const publicAddress = detectListenOptions('PUBLIC', listen.host, listen.port); |
65 | 65 | ||
66 | if (listen.secure) { | ||
67 | // Since nodejs 20, we'd need to pass in HTTPS options manually. | ||
68 | throw new Error(`Preview on secure port ${listen.port} is not supported`); | ||
69 | } | ||
70 | |||
66 | const backendConfig: BackendConfig = { | 71 | const backendConfig: BackendConfig = { |
67 | webSocketURL: `${listenURL(publicAddress, 'ws')}/${API_ENDPOINT}`, | 72 | webSocketURL: `${listenURL(publicAddress, 'ws')}/${API_ENDPOINT}`, |
68 | }; | 73 | }; |
@@ -75,7 +80,6 @@ export default function detectDevModeOptions(): DevModeOptions { | |||
75 | host: listen.host, | 80 | host: listen.host, |
76 | port: listen.port, | 81 | port: listen.port, |
77 | strictPort: true, | 82 | strictPort: true, |
78 | https: listen.secure, | ||
79 | headers: { | 83 | headers: { |
80 | // Enable strict origin isolation, see e.g., | 84 | // Enable strict origin isolation, see e.g., |
81 | // https://github.com/vitejs/vite/issues/3909#issuecomment-1065893956 | 85 | // https://github.com/vitejs/vite/issues/3909#issuecomment-1065893956 |