File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
pwa-kit-react-sdk/src/ssr/server
template-retail-react-app/config Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -253,11 +253,16 @@ const main = async () => {
253253 error ( 'Could not determine app entrypoint.' )
254254 process . exit ( 1 )
255255 }
256-
256+ // Load config to get envBasePath from ssrParameters for local development
257+ // This mimics how MRT sets the MRT_ENV_BASE_PATH system environment variable
258+ const config = getConfig ( ) || { }
259+ const disableHttpOnlySessionCookies =
260+ config . ssrParameters ?. disableHttpOnlySessionCookies || true
257261 execSync ( `${ babelNode } ${ inspect ? '--inspect' : '' } ${ babelArgs } ${ entrypoint } ` , {
258262 env : {
259263 ...process . env ,
260- ...( noHMR ? { HMR : 'false' } : { } )
264+ ...( noHMR ? { HMR : 'false' } : { } ) ,
265+ MRT_DISABLE_HTTPONLY_SESSION_COOKIES : disableHttpOnlySessionCookies
261266 }
262267 } )
263268 } )
Original file line number Diff line number Diff line change @@ -365,6 +365,7 @@ const renderApp = (args) => {
365365 __CONFIG__ : config ,
366366 __PRELOADED_STATE__ : appState ,
367367 __ERROR__ : error ,
368+ __MRT_DISABLE_HTTPONLY_SESSION_COOKIES__ : process . env . MRT_DISABLE_HTTPONLY_SESSION_COOKIES ,
368369 // `window.Progressive` has a long history at Mobify and some
369370 // client-side code depends on it. Maintain its name out of tradition.
370371 Progressive : getWindowProgressive ( req , res )
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ module.exports = {
103103 ] ,
104104 ssrParameters : {
105105 ssrFunctionNodeVersion : '22.x' ,
106+ disableHttpOnlySessionCookies : true ,
106107 proxyConfigs : [
107108 {
108109 host : 'kv7kzm78.api.commercecloud.salesforce.com' ,
You can’t perform that action at this time.
0 commit comments