fix: handle immutable headers returned by native fetch in middleware#589
fix: handle immutable headers returned by native fetch in middleware#589
Conversation
|
|
@Kakadus is attempting to deploy a commit to the ory Team on Vercel. A member of the Team first needs to authorize it. |
9151ba0 to
832a8a1
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #589 +/- ##
===========================================
+ Coverage 42.43% 56.02% +13.59%
===========================================
Files 136 174 +38
Lines 2008 3259 +1251
Branches 288 481 +193
===========================================
+ Hits 852 1826 +974
- Misses 1149 1358 +209
- Partials 7 75 +68
🚀 New features to boost your workflow:
|
|
The formatting CI error is only on unrelated files. The codecov report also looks sketchy to me, as all lines are clearly executed / are in tests. |
jonas-jonas
left a comment
There was a problem hiding this comment.
Thank you! Looks reasonable to me.
Related Issue or Design Document
Close #588
On nodejs, the headers returned by
fetchare immutable, following the whatwg standard. In the nextjs middleware, this leads to anTypeErrorwhen proxying e.g. POST login requests to kratos.This clones the headers object before modification, preventing the error.
Checklist
If this pull request addresses a security vulnerability,
I confirm that I got approval (please contact security@ory.sh) from the maintainers to push the changes.
Further comments