diff options
author | 2022-10-02 15:45:49 +0200 | |
---|---|---|
committer | 2022-10-03 20:06:53 +0200 | |
commit | 70ac4438b05136c54017d98a883bf6bf0f938d47 (patch) | |
tree | 2418f8670bf8ff2d7e6f6be2768c112e56de2a79 /subprojects/frontend/vite.config.ts | |
parent | feat(frontend): animate GenerateButton (diff) | |
download | refinery-70ac4438b05136c54017d98a883bf6bf0f938d47.tar.gz refinery-70ac4438b05136c54017d98a883bf6bf0f938d47.tar.zst refinery-70ac4438b05136c54017d98a883bf6bf0f938d47.zip |
feat(frontend): enable cross-origin isolation
Diffstat (limited to 'subprojects/frontend/vite.config.ts')
-rw-r--r-- | subprojects/frontend/vite.config.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/subprojects/frontend/vite.config.ts b/subprojects/frontend/vite.config.ts index 7cea4642..1059ed2f 100644 --- a/subprojects/frontend/vite.config.ts +++ b/subprojects/frontend/vite.config.ts | |||
@@ -161,6 +161,13 @@ export default defineConfig({ | |||
161 | host: listenHost, | 161 | host: listenHost, |
162 | port: listenPort, | 162 | port: listenPort, |
163 | strictPort: true, | 163 | strictPort: true, |
164 | headers: { | ||
165 | // Enable strict origin isolation, see e.g., | ||
166 | // https://github.com/vitejs/vite/issues/3909#issuecomment-1065893956 | ||
167 | 'Cross-Origin-Opener-Policy': 'same-origin', | ||
168 | 'Cross-Origin-Embedder-Policy': 'require-corp', | ||
169 | 'Cross-Origin-Resource-Policy': 'cross-origin', | ||
170 | }, | ||
164 | proxy: { | 171 | proxy: { |
165 | '/xtext-service': { | 172 | '/xtext-service': { |
166 | target: `${apiSecure ? 'https' : 'http'}://${apiHost}:${apiPort}`, | 173 | target: `${apiSecure ? 'https' : 'http'}://${apiHost}:${apiPort}`, |