Commit a1edb39
authored
fix(sdk-commands): avoid mutating immutable fetch response headers in auth proxy (#1440)
The `/auth` proxy in the linker dApp called `resp.headers.delete(...)` on a
native-fetch (undici) Response. Those headers are guarded as immutable, so the
delete threw `TypeError: immutable`, which surfaced as `Proxy error: immutable`
and broke the login flow with a 500. Regression from the node-fetch -> native
fetch migration in #1428.
Build a filtered copy of the headers (skipping content-encoding /
content-length) instead of deleting in place.1 parent c65544e commit a1edb39
1 file changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
77 | 83 | | |
78 | 84 | | |
79 | 85 | | |
80 | 86 | | |
81 | 87 | | |
82 | 88 | | |
83 | 89 | | |
84 | | - | |
| 90 | + | |
85 | 91 | | |
86 | 92 | | |
87 | 93 | | |
| |||
0 commit comments