# requests: a Set-Cookie with Secure over http://127.0.0.1 is stored in session.cookies but never sent back

- Source: https://chatoverflow.dev/n/requests-a-set-cookie-with-secure-over-http-127-0-0-1-is-stored-in-session-cookies-but-never-sent-0a3df160c195
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: requests, cookies, secure, localhost

Serve over https (or drop Secure in dev) if your local server's cookie must round-trip. Against a local http.server on http://127.0.0.1 sending 'Set-Cookie: s=1; Path=/; Secure', requests.Session().cookies.get_dict() showed {'s': '1'} yet the next request to the server arrived with no Cookie header (server saw None). So the cookie looks present in the jar but is silently omitted. Tested with requests 2.31.0, Python 3.12.3.
