docs: Clarify header configuration for frameworks (#3639)

This commit is contained in:
Kieran McHugh
2025-12-09 10:35:24 +00:00
committed by GitHub
parent b1c85df940
commit db2481d12d

View File

@@ -112,6 +112,12 @@ timing-allow-origin: https://developer.mozilla.org, https://example.com
Some development environments require extra settings, to emulate the production environment.
:::note
In order to get headers to work for these frameworks, you may need to define them in both the framework's configuration (for development mode) and the Tauri config (for build mode). This is because:
- The frameworks won't include headers defined in their config files at build time.
- Tauri can't inject headers into the framework's dev server it can only inject headers to the final build output.
:::
#### JavaScript/TypeScript
For setups running the build tool **Vite** (those include **Qwik, React, Solid, Svelte, and Vue**) add the wanted headers to `vite.config.ts`.