47fac22230
- .claude/CLAUDE.md - .claude/commands/subagentes.md - .claude/rules/INDEX.md - .mcp.json - bash/functions/cybersecurity/analyze_dns.md - bash/functions/cybersecurity/audit_http_headers.md - bash/functions/cybersecurity/audit_ssh_config.md - bash/functions/cybersecurity/check_firewall.md - bash/functions/cybersecurity/detect_suspicious_users.md - bash/functions/cybersecurity/encrypt_file.md - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.6 KiB
1.6 KiB
id, name, kind, lang, domain, purity, version, tested, description, tags, signature, uses_functions, uses_types, returns, returns_optional, error_type, imports, file_path, example, params, output
| id | name | kind | lang | domain | purity | version | tested | description | tags | signature | uses_functions | uses_types | returns | returns_optional | error_type | imports | file_path | example | params | output | |||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| cdp_set_cookie_go_browser | cdp_set_cookie | function | go | browser | impure | 1.0.0 | false | Establece una cookie en el browser via Network.setCookie del protocolo CDP. Soporta cookies HttpOnly. Util para tests e2e que necesitan autenticar el browser sin pasar por la UI de login. |
|
func CdpSetCookie(c *CDPConn, name, value, domain, path string, httpOnly bool) error |
|
false | error_go_core | functions/browser/cdp_set_cookie.go | conn, _ := browser.CdpConnect(9222) defer browser.CdpClose(conn, 0) // Tras hacer login HTTP en el test: if err := browser.CdpSetCookie(conn, "session", token, "localhost", "/", true); err != nil { log.Fatal(err) } browser.CdpNavigate(conn, "http://localhost:8080/dashboard") |
|
error si Network.setCookie falla; nil en exito |
Notas
- Network.setCookie es un comando CDP nativo, no requiere JS evaluate.
- Permite cookies HttpOnly que
document.cookieno puede setear desde JS. - Necesita que el dominio coincida con la URL a la que se navegara despues.