Repository navigation
fix(network): treat loopback addresses as secure for cookies - #43136
Merged
Pavel Feldman (pavelfeldman) merged 1 commit intoOct 5, 2026
Merged
Conversation
Yury Semikhatsky (yury-s)
approved these changes
Oct 5, 2026
Yury Semikhatsky (yury-s)
left a comment
Member
There was a problem hiding this comment.
Does webkit treat it as secure too?
Contributor
Test results for "tests 1"7 flaky52639 passed, 1270 skipped Merge workflow run. |
Contributor
Test results for "MCP"9035 passed, 1495 skipped Merge workflow run. |
tf4fun (tf4fun)
added a commit
to tf4fun/antnest-platform
that referenced
this pull request
Nov 5, 2026
Playwright 1.64 includes upstream fix microsoft/playwright#43136: APIRequestContext and cookies(httpURL) now treat 127.0.0.0/8 and [::1] as local hostnames and send Secure cookies over loopback HTTP, matching Chromium. The repo check that documented the old gap expects 401 and fails with 200. The bridge stays: it still pins explicit session cookies, derives the CSRF header and keeps maxRedirects at zero. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
isLocalHostname()now matches127.0.0.0/8and[::1]in addition tolocalhostand*.localhost, soSecurecookies are kept and sent over plain HTTP to loopback addresses, as browsers do.APIRequestContextcookie headers,request.cookies()andbrowserContext.cookies().Fixes #43115