File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
packages/runtime/src/templates/edge-shared Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -31,12 +31,12 @@ export const addMiddlewareHeaders = async (
31
31
// We need to await the response to get the origin headers, then we can add the ones from middleware.
32
32
const res = await originResponse
33
33
const response = new Response ( res . body , res )
34
- const originCookies = response . headers . get ( 'set-cookie' )
35
34
middlewareResponse . headers . forEach ( ( value , key ) => {
36
- response . headers . set ( key , value )
37
- // Append origin cookies after middleware cookies
38
- if ( key === 'set-cookie' && originCookies ) {
39
- response . headers . append ( key , originCookies )
35
+ if ( key === 'set-cookie' ) {
36
+ response . headers . append ( key , value )
37
+ }
38
+ else {
39
+ response . headers . set ( key , value )
40
40
}
41
41
} )
42
42
return response
You can’t perform that action at this time.
0 commit comments