Commit 64f73f3
committed
VIA-357 MD/DB Fix middleware adding extra request headers to only modify request, not response
In the previous implementation the headers sent into the
NextResponse.next method get applied to both the inbound reuqest AND
override the response headers as well. This unintended manipulation of
the response headers causes errors when calling Server Actions, where
next.js expects a particular content-type in the response and the
framework will throw an unhandled error if the header is not set as
expected.1 parent c85d0d1 commit 64f73f3
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
0 commit comments