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

fix: corsify issue "can't modify immutable headers" #252

Open
wants to merge 1 commit into
base: v5.x
Choose a base branch
from

Conversation

nicolasvienot
Copy link

@nicolasvienot nicolasvienot commented Jun 27, 2024

Description

A fix was implemented in 74f63ab to clone the response in corsify in order to avoid this error:

{
  "status": 500,
  "error": "Can't modify immutable headers."
}

Unfortunately, it seems not to be enough, and we're still having the issue with Cloudflare when a response is modified by corsify. A solution we found and implemented is to recreate a response by using new Response(...).

Applying the fix here.

Related Issue

Link to the related issue: related to #242

Type of Change (select one and follow subtasks)

  • Bug fix (non-breaking change which fixes an issue)

@nicolasvienot
Copy link
Author

I can open a new issue if needed, please let me know 👍
it might also be related to: #249

@nicolasvienot nicolasvienot marked this pull request as ready for review June 27, 2024 10:06
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.

None yet

1 participant