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

Allow setting custom headers for the fullstack dev server #18135

Open
jkbz64 opened this issue Mar 12, 2025 · 0 comments
Open

Allow setting custom headers for the fullstack dev server #18135

jkbz64 opened this issue Mar 12, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@jkbz64
Copy link

jkbz64 commented Mar 12, 2025

What is the problem this feature would solve?

One of the common issues of building small iframe apps (where bun fullstack dev server works really well) is working around the CORS during the dev, it can be (kinda) workaround with bunx serve with correct serve.json (or spinning up nginx) + bun build --watch (without doing hacks like allowing insecure origin in the browser) but it would be nice to be able to do it directly through bun.

What is the feature you are proposing to solve the problem?

Some ideas:

  • Allow adding the headers through the env variables
  • Add some executable switch like --custom-header="Access-Control-Allow-Origin: *"
  • bunfig.toml section
  • Pull headers from meta tags e.g <meta http-equiv="Access-Control-Allow-Origin" content="*" />

What alternatives have you considered?

No response

@jkbz64 jkbz64 added the enhancement New feature or request label Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant