With Nginx as reverse proxy, how do you add samesite=strict or samesite=lax to cookies?
Nginx – Add SameSite to Cookies Using Nginx as Reverse Proxy
cookiesnginxreverse-proxyrewrite
cookiesnginxreverse-proxyrewrite
With Nginx as reverse proxy, how do you add samesite=strict or samesite=lax to cookies?
Best Answer
With this code you can define all your application cookies as secure, httponly and/or samesite using
proxy_cookie_path
(http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cookie_path)