Skip to content

Rename MRT_DISABLE_HTTPONLY_SESSION_COOKIES to MRT_ENABLE_HTTPONLY_SESSION_COOKIES#3723

Merged
unandyala merged 3 commits intofeature/httponly-session-cookiesfrom
unandyala.rename-config
Mar 5, 2026
Merged

Rename MRT_DISABLE_HTTPONLY_SESSION_COOKIES to MRT_ENABLE_HTTPONLY_SESSION_COOKIES#3723
unandyala merged 3 commits intofeature/httponly-session-cookiesfrom
unandyala.rename-config

Conversation

@unandyala
Copy link
Contributor

@unandyala unandyala commented Mar 5, 2026

Summary

  • Rename MRT_DISABLE_HTTPONLY_SESSION_COOKIESMRT_ENABLE_HTTPONLY_SESSION_COOKIES to remove the double-negative pattern
  • Rename config flag disableHttpOnlySessionCookiesenableHttpOnlySessionCookies
  • Rename window global __MRT_DISABLE_HTTPONLY_SESSION_COOKIES____MRT_ENABLE_HTTPONLY_SESSION_COOKIES__
  • Flip comparison logic accordingly (=== 'false'=== 'true', default ?? true?? false)

Packages touched

  • pwa-kit-runtime — proxy auth, token response processing
  • pwa-kit-react-sdk — window global for SSR
  • pwa-kit-dev — local dev env var
  • pwa-kit-create-app — generator templates
  • template-retail-react-app — _app-config, config

Test plan

  • build-remote-server.test.js — 54/54 passed
  • configure-proxy.basic.test.js — 10/10 passed
  • Coordinate with MRT & ECOM team on env var and config rename

🤖 Generated with Claude Code

@cc-prodsec
Copy link
Collaborator

cc-prodsec commented Mar 5, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@unandyala unandyala changed the title Rename disable to enable HttpOnly cookies, refactor proxy auth, add x-site-id header Rename MRT_DISABLE_HTTPONLY_SESSION_COOKIES to MRT_ENABLE_HTTPONLY_SESSION_COOKIES Mar 5, 2026
@unandyala unandyala marked this pull request as ready for review March 5, 2026 16:00
@unandyala unandyala requested a review from a team as a code owner March 5, 2026 16:00
@alexvuong
Copy link
Contributor

There are some unverified commits in this PR

unandyala and others added 3 commits March 5, 2026 14:51
…SSION_COOKIES

Remove the double-negative pattern. Rename the env var, config flag
(disableHttpOnlySessionCookies → enableHttpOnlySessionCookies), and
window global across all packages. Flip comparison logic accordingly.

Also includes: rename functions for clarity (setScapiAuthRequestHeaders,
setTokensInLogoutRequest, setHttpOnlySessionCookies), extract logout
token injection, remove unused siteId fallback/trim, make
slasLogoutEndpoint a non-overridable constant, guard proxy auth behind
HttpOnly flag, and add x-site-id header for dynamic multisite siteId.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@unandyala unandyala force-pushed the unandyala.rename-config branch from 8573380 to b0754e1 Compare March 5, 2026 20:52
privateClientProxyEndpoint={slasPrivateClientProxyEndpoint}
// Uncomment 'hybridAuthEnabled' if the current site has Hybrid Auth enabled. Do NOT set this flag for hybrid storefronts using Plugin SLAS.
// hybridAuthEnabled={true}
useHttpOnlySessionCookies={
Copy link
Contributor Author

Choose a reason for hiding this comment

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

missed the template change before. So added this here

Copy link
Contributor

@vcua-mobify vcua-mobify left a comment

Choose a reason for hiding this comment

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

Small question. Does this change mean that the default if that env var is not set is now http only is off?

It's probably fine since it's a new feature and existing projects will need to make a change regardless to enable the feature.

@unandyala
Copy link
Contributor Author

Small question. Does this change mean that the default if that env var is not set is now http only is off?

It's probably fine since it's a new feature and existing projects will need to make a change regardless to enable the feature.

The default is off (httponly=false) for existing storefronts. It will be on by default for any new storefront that is generated.

@unandyala unandyala merged commit 8132904 into feature/httponly-session-cookies Mar 5, 2026
42 checks passed
@unandyala unandyala deleted the unandyala.rename-config branch March 5, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants