File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
packages/qwik-city/src/middleware/request-handler Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -102,8 +102,20 @@ export function createRequestEvent(
102102 } else {
103103 status = statusOrResponse . status ;
104104 statusOrResponse . headers . forEach ( ( value , key ) => {
105+ if ( key . toLowerCase ( ) === 'set-cookie' ) {
106+ return ;
107+ }
105108 headers . append ( key , value ) ;
106109 } ) ;
110+ statusOrResponse . headers . getSetCookie ( ) . forEach ( ( ck ) => {
111+ const index = ck . indexOf ( '=' ) ;
112+ if ( index === - 1 ) {
113+ return ;
114+ }
115+ const key = ck . slice ( 0 , index ) . trim ( ) ;
116+ const value = ck . slice ( index + 1 ) . trim ( ) ;
117+ cookie . set ( key , value ) ;
118+ } ) ;
107119 if ( statusOrResponse . body ) {
108120 const writableStream = requestEv . getWritableStream ( ) ;
109121 statusOrResponse . body . pipeTo ( writableStream ) ;
You can’t perform that action at this time.
0 commit comments