Skip to content

Commit 853f658

Browse files
committed
Fix secure cookie handling for multi-level subdomains
Disable ThirdPartyStoragePartitioning and PartitionedCookies features to fix an issue where Chrome fails to properly respect the Secure flag on cookies set with Domain=.example.com when accessed from multi-level subdomains like dev.app.example.com. This resolves the cookie persistence issue documented in #421 where session cookies were not being sent on subsequent HTTPS requests to dev.app.example.com despite being set correctly by the server. Fixes #421
1 parent 800e7e8 commit 853f658

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/browser.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ export async function launch(options: McpLaunchOptions): Promise<Browser> {
111111
const args: LaunchOptions['args'] = [
112112
...(options.args ?? []),
113113
'--hide-crash-restore-bubble',
114+
// Fix cookie handling for subdomain patterns (e.g., dev.app.example.com)
115+
// Disable third-party cookie partitioning which can interfere with secure cookies
116+
'--disable-features=ThirdPartyStoragePartitioning,PartitionedCookies',
114117
];
115118
if (headless) {
116119
args.push('--screen-info={3840x2160}');

0 commit comments

Comments
 (0)