Steven Lykins
Steven Lykins

Reputation: 59

Is there a way to set the SameSite cookie to none with Nginx?

On an Apache test server, our vendors were able to achieve what we needed by setting

Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure;SameSite=None

in .htaccess. However, our live site is running Nginx and we are having trouble figuring out how to translate this into something we can configure there.

Upvotes: 3

Views: 7408

Answers (2)

Ahmad
Ahmad

Reputation: 127

According to the nginx document ,you can use proxy_cookie_flags:

proxy_cookie_flags your-cookie-name samesite=none;

Upvotes: 0

AeonM
AeonM

Reputation: 314

Try: proxy_cookie_path / "/; secure; HttpOnly; SameSite=none";

Upvotes: 2

Related Questions