psf / requests

A simple, yet elegant, HTTP library.
https://requests.readthedocs.io/en/latest/
Apache License 2.0
52.17k stars 9.33k forks source link

Support for SameSite cookie flag. #5613

Open anio opened 4 years ago

anio commented 4 years ago

Hi,

Have you any plan to expose samesite cookie flag?

sigmavirus24 commented 4 years ago

We use the standard library which doesn't expose it but I'm working on moreos which will have a cookie jar that's saner, more secure, and would expose this for Requests as a drop-in replacement

anio commented 4 years ago

You are right, but I think it's possible to add to newer python versions. I added it to my fork for my use case.

https://github.com/anio/requests/commit/ae838c9741e39d53dea780d72137dfc4ad048b04

sigmavirus24 commented 4 years ago

Newer python versions aren't all we support and further, don't have a samesite attribute here