Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for custom response headers #61

Merged
merged 7 commits into from
Dec 20, 2023

Conversation

johnpryan
Copy link
Contributor

@johnpryan johnpryan commented Dec 19, 2023

This is helpful when you want to return custom response headers. For example, if you want to enable SharedArrayBuffer support for a Flutter app with the skwasm renderer:

flutter build --wasm --web-renderer=skwasm
dhttpd --path=build/web_wasm --headers="Cross-Origin-Embedder-Policy=require-corp;Cross-Origin-Opener-Policy=same-origin"

example:
--headers header=value;header2=value;
@kevmoo
Copy link
Owner

kevmoo commented Dec 19, 2023

@johnpryan – maybe support headers in a file? Is there a convention for that?

it'd be MUCH easier to repeat over time

@johnpryan
Copy link
Contributor Author

I'm not sure there's a common way to define HTTP headers other than in code. How about a JSON file?

@johnpryan
Copy link
Contributor Author

I think I prefer a flag, normally I use scripts when I want repeatability.

Copy link
Owner

@kevmoo kevmoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a changelog entry?
Any way to add a test?

@parlough
Copy link

parlough commented Dec 20, 2023

I was overriding the headers in Chrome :P, this is much easier 💙

@kevmoo kevmoo merged commit 3c0f0ad into kevmoo:master Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants