mirror of
https://github.com/tauri-apps/tauri-docs.git
synced 2026-01-31 00:35:16 +01:00
docs: Clarify header configuration for frameworks (#3639)
This commit is contained in:
@@ -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`.
|
||||
|
||||
Reference in New Issue
Block a user