Skip to content

Commit b0754e1

Browse files
unandyalaclaude
andcommitted
Add useHttpOnlySessionCookies to _app-config generator templates
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5ea1655 commit b0754e1

File tree

2 files changed

+10
-0
lines changed
  • packages/pwa-kit-create-app/assets
    • bootstrap/js/overrides/app/components/_app-config
    • templates/@salesforce/retail-react-app/app/components/_app-config

2 files changed

+10
-0
lines changed

packages/pwa-kit-create-app/assets/bootstrap/js/overrides/app/components/_app-config/index.jsx.hbs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ const AppConfig = ({children, locals = {}}) => {
107107
privateClientProxyEndpoint={slasPrivateClientProxyEndpoint}
108108
// Uncomment 'hybridAuthEnabled' if the current site has Hybrid Auth enabled. Do NOT set this flag for hybrid storefronts using Plugin SLAS.
109109
// hybridAuthEnabled={true}
110+
useHttpOnlySessionCookies={
111+
typeof window !== 'undefined'
112+
? window.__MRT_ENABLE_HTTPONLY_SESSION_COOKIES__ === 'true'
113+
: process.env.MRT_ENABLE_HTTPONLY_SESSION_COOKIES === 'true'
114+
}
110115
>
111116
<MultiSiteProvider site={locals.site} locale={locals.locale} buildUrl={locals.buildUrl}>
112117
<StoreLocatorProvider config={storeLocatorConfig}>

packages/pwa-kit-create-app/assets/templates/@salesforce/retail-react-app/app/components/_app-config/index.jsx.hbs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ const AppConfig = ({children, locals = {}}) => {
108108
privateClientProxyEndpoint={slasPrivateClientProxyEndpoint}
109109
// Uncomment 'hybridAuthEnabled' if the current site has Hybrid Auth enabled. Do NOT set this flag for hybrid storefronts using Plugin SLAS.
110110
// hybridAuthEnabled={true}
111+
useHttpOnlySessionCookies={
112+
typeof window !== 'undefined'
113+
? window.__MRT_ENABLE_HTTPONLY_SESSION_COOKIES__ === 'true'
114+
: process.env.MRT_ENABLE_HTTPONLY_SESSION_COOKIES === 'true'
115+
}
111116
>
112117
<MultiSiteProvider site={locals.site} locale={locals.locale} buildUrl={locals.buildUrl}>
113118
<StoreLocatorProvider config={storeLocatorConfig}>

0 commit comments

Comments
 (0)