Black Lives Matter. Please consider donating to Black Girls Code today.

Setting 'Samesite' attribute to 'Lax' or 'Strict'

This isn’t really a Dash issue, but I’m having some challenges setting the ‘SameSite’ attribute for cookies on my Dash project. I’m using flask-session, which hasn’t been updated for a few years. The documentation for flask-session does not show the ‘SameSite’ attribute as being configurable.

I was able to set the ‘SameSite’ attribute using NGINX for a prototype deployment using this approach, but I’m no longer using NGINX for the production deployment. I think I can use a similar approach with the production web server though. I’m just curious if this is something that can be handled by the application instead of the web server.