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

Fetch Response Headers Mutable in Miniflare, not on Production #242

Closed
nickreese opened this issue Apr 13, 2022 · 2 comments
Closed

Fetch Response Headers Mutable in Miniflare, not on Production #242

nickreese opened this issue Apr 13, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@nickreese
Copy link

Hey all, been working on a framework for building cloudflare workers to serve static sites.

In the development process I stumbled across a few bugs discussed on Discord but this one was asked for a ticket to be opened.

Below works in miniflare but not on production.:

const r = await fetch(`https://example.com`);

r.headers.set('foo', 'bar');

I found just by chance that this works on production:

const r = await fetch(`https://example.com`);

const rMutable = new Request(r.body, r);
rMutable.headers.set('foo', 'bar');
@mrbbot
Copy link
Contributor

mrbbot commented May 20, 2022

Hey! 👋 Thanks for raising this! I'm pretty busy the next few weeks with exams, but will try get this fixed soon. 👍

@mrbbot mrbbot added the bug Something isn't working label May 20, 2022
@mrbbot mrbbot closed this as completed in 1599c75 May 27, 2022
@mrbbot
Copy link
Contributor

mrbbot commented May 27, 2022

Hey! I've just released version 2.5.0 with a fix for this. Please let me know if you have any other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants