Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/pwa-kit-create-app/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- Support email mode by default for passwordless login and password reset in a generated app. [#3525](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3525)
- Util function for passwordless callback URI [#3630](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3630)
- Add `tokenLength` to login configuration [#3554](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3554)
- Add configuration flag `disableHttpOnlySessionCookies` to `ssrParameters` [#3635](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3635)

## v3.15.0 (Dec 17, 2025)
- Add new Google Cloud API configuration and Bonus Product configuration [#3523](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3523)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ module.exports = {
// Additional parameters that configure Express app behavior.
ssrParameters: {
ssrFunctionNodeVersion: '22.x',
// Store the session cookies as HttpOnly for enhanced security.
disableHttpOnlySessionCookies: false,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For any new projects, we want to enable HttpOnly cookies by deafult

proxyConfigs: [
{
host: '{{answers.project.commerce.shortCode}}.api.commercecloud.salesforce.com',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ module.exports = {
// Additional parameters that configure Express app behavior.
ssrParameters: {
ssrFunctionNodeVersion: '22.x',
// Store the session cookies as HttpOnly for enhanced security.
disableHttpOnlySessionCookies: false,
proxyConfigs: [
{
host: '{{answers.project.commerce.shortCode}}.api.commercecloud.salesforce.com',
Expand Down
2 changes: 2 additions & 0 deletions packages/pwa-kit-dev/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## v3.16.0-dev (Dec 17, 2025)
Add configuration flag `disableHttpOnlySessionCookies` to `ssrParameters` [#3635](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3635)

## v3.15.0 (Dec 17, 2025)

## v3.14.0 (Nov 04, 2025)
Expand Down
9 changes: 7 additions & 2 deletions packages/pwa-kit-dev/bin/pwa-kit-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,16 @@ const main = async () => {
error('Could not determine app entrypoint.')
process.exit(1)
}

// Load config to get envBasePath and disableHttpOnlySessionCookies from ssrParameters for local development
// This mimics how MRT sets the system environment variable
const config = getConfig() || {}
const disableHttpOnlySessionCookies =
config.ssrParameters?.disableHttpOnlySessionCookies || true
execSync(`${babelNode} ${inspect ? '--inspect' : ''} ${babelArgs} ${entrypoint}`, {
env: {
...process.env,
...(noHMR ? {HMR: 'false'} : {})
...(noHMR ? {HMR: 'false'} : {}),
MRT_DISABLE_HTTPONLY_SESSION_COOKIES: disableHttpOnlySessionCookies
}
})
})
Expand Down
2 changes: 2 additions & 0 deletions packages/pwa-kit-react-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## v3.16.0-dev (Dec 17, 2025)
Add configuration flag `disableHttpOnlySessionCookies` to `ssrParameters` [#3635](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3635)

## v3.15.0 (Dec 17, 2025)

## v3.14.0 (Nov 04, 2025)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ const renderApp = (args) => {
__CONFIG__: config,
__PRELOADED_STATE__: appState,
__ERROR__: error,
__MRT_DISABLE_HTTPONLY_SESSION_COOKIES__: process.env.MRT_DISABLE_HTTPONLY_SESSION_COOKIES,
// `window.Progressive` has a long history at Mobify and some
// client-side code depends on it. Maintain its name out of tradition.
Progressive: getWindowProgressive(req, res)
Expand Down
1 change: 1 addition & 0 deletions packages/template-retail-react-app/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- Util function for passwordless callback URI [#3630](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3630)
- [BREAKING] Remove unused absoluteUrl util from retail react app [#3633](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3633)
- Allow shopper to manually input OTP during passwordless login [#3554](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3554)
- Add configuration flag `disableHttpOnlySessionCookies` to `ssrParameters` [#3635](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3635)

## v8.3.0 (Dec 17, 2025)
- [Bugfix] Fix Forgot Password link not working from Account Profile password update form [#3493](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3493)
Expand Down
2 changes: 2 additions & 0 deletions packages/template-retail-react-app/config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ module.exports = {
],
ssrParameters: {
ssrFunctionNodeVersion: '22.x',
// Store the session cookies as HttpOnly for enhanced security.
disableHttpOnlySessionCookies: false,
proxyConfigs: [
{
host: 'kv7kzm78.api.commercecloud.salesforce.com',
Expand Down
Loading