feat(read): add --cookie-file for header and Netscape cookies - #5
Open
jieyuexing wants to merge 1 commit into
Open
feat(read): add --cookie-file for header and Netscape cookies#5jieyuexing wants to merge 1 commit into
jieyuexing wants to merge 1 commit into
Conversation
Direct `opsail read` of an HTTP(S) URL can send cookies from a file path (`--cookie-file` / `options.cookieFile`). The file is either one Cookie request-header line or a Netscape cookies.txt dump. A header line is sent unchanged to that URL. Netscape records are sent only when they match the request host, path, Secure flag, and expiry. Other hosts in the same file are ignored. This is for static HTTP only. It cannot be combined with `--launch` or `--cdp`. Pages that need a real browser session should still use `--cdp`. If cookies are set and the server redirects: - same host, HTTP to HTTPS: follow, and choose cookies again for the HTTPS URL - different host, or HTTPS to HTTP: stop; do not send cookies there Cookie values never appear on the command line, in Debug output, in logs, or in ReadResult. Callers pass a file path, not the secret.
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.
Direct
opsail readof an HTTP(S) URL can send cookies from a file path (--cookie-file/options.cookieFile). The file is either one Cookie request-header line or a Netscape cookies.txt dump.A header line is sent unchanged to that URL. Netscape records are sent only when they match the request host, path, Secure flag, and expiry. Other hosts in the same file are ignored.
This is for static HTTP only. It cannot be combined with
--launchor--cdp. Pages that need a real browser session should still use--cdp.Cookie values never appear on the command line, in Debug output, in logs, or in ReadResult. Callers pass a file path, not the secret.