trunk
trunk copied to clipboard
Setting Headers for the Trunk dev server.
I want to be able to serve my application (via localhost
) with the following headers, to enable SharedArrayBuffer
:
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Opener-Policy: same-origin
Currently, there doesn't seem to be a way to explicitly set headers for the dev server. It would be great if these could be set via the Trunk.toml
file!
Agreed that the Trunk.toml
would be the best place for this.
- The configuration cascade is as follows: env -> Trunk.toml -> CLI (in order of lowest precedence to highest precedence).
- You can see where the config cascade starts in the code in main.
- The CLI & ENV config are parsed together, and then that data is passed into the config/models.rs code which I linked to above. Best place to start with the config model changes would be config/models.rs.
Is anyone working on this?
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.
This probably should be planned, or, at least, the default headers should be set to allow SharedArrayBuffer
use.