Skip to content

Add --internal-cookie-store option for Playground CLI #2323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 8, 2025

Conversation

adamziel
Copy link
Collaborator

@adamziel adamziel commented Jul 3, 2025

Description

Adds a new --internal-cookie-store flag in the Playground CLI and a corresponding internalCookieStore argument in RunCLIArgs. When enabled, all the cookies are stored and served from an internal cookie jar. By default, that option is disabled and the user agent is responsible for handling cookies.

Motivation

Some workflows need Playground to own cookie persistence, e.g. VS Code webview does not store cookies so any Blueprint with autologin enabled results in an infinite redirection loop.

Testing steps

  • Start Playground CLI without the flag and confirm that WordPress sends a set-cookie header both on the homepage and when logging in.
  • Restart it with --internal-cookie-store and verify no cookies are sent to the browser. Confirm the admin login form still works.

cc @bgrgicak @ryanwelcher

@@ -593,6 +602,7 @@ export async function runCLI(args: RunCLIArgs): Promise<RunCLIServer> {
processIdSpaceLength,
followSymlinks,
trace,
disableCookieStore: !args.internalCookieStore,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

let's use a consistent internalCookieStore name everywhere and also add a README entry before merging.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I have created a PR for it: #2325

@adamziel adamziel merged commit eee84fc into trunk Jul 8, 2025
24 of 25 checks passed
@adamziel adamziel deleted the enable-cookie-store-in-cli branch July 8, 2025 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants