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

Deleting Headers Causing Immutable TypeErrors #168

Closed
hassanbazzi opened this issue Oct 10, 2022 · 1 comment · Fixed by #170
Closed

Deleting Headers Causing Immutable TypeErrors #168

hassanbazzi opened this issue Oct 10, 2022 · 1 comment · Fixed by #170

Comments

@hassanbazzi
Copy link

hassanbazzi commented Oct 10, 2022

response.headers.delete('content-encoding');

Hey! Working on writing some middleware functions and I suddenly started getting TypeError: Immutable

After some detective work, I found out it's because of the above 3 lines that try to delete these 3 headers when doing a redirection. When I delete these 3 lines locally, everything works as expected. Any idea what these 3 do or why this is happening?

I also understand this hasn't been changed in quite some time, and so it might be something else that's causing this to happen under the hood, I just don't understand it enough and some guidance would be amazing.

I'm on vercel cli 28.4.8.

@Kikobeats
Copy link
Member

Kikobeats commented Oct 13, 2022

Thanks for reporting @hassanbazzi

CleanShot 2022-10-13 at 10 22 33@2x

It's fixed in the Vercel CLI vercel@28.4.10.

If you install the latest Vercel CLI version, you shouldn't experience in the issue anymore 🙂

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 a pull request may close this issue.

2 participants