Skip to content

Commit af8b529

Browse files
committed
Added SameSite flag to the README.md
1 parent 99c47b0 commit af8b529

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,15 @@ Earlier versions is not tested.
3434

3535
```Nginx
3636
location / {
37-
set_cookie_flag Secret HttpOnly secure;
37+
set_cookie_flag Secret HttpOnly secure SameSite;
3838
set_cookie_flag * HttpOnly;
39-
set_cookie_flag SessionID secure;
39+
set_cookie_flag SessionID SameSite=Lax secure;
40+
set_cookie_flag SiteToken SameSite=Strict;
4041
}
4142
```
4243

4344
## Description
44-
This module for Nginx allows to set the flags "**HttpOnly**" and "**secure**" for cookies in the "*Set-Cookie*" response headers.
45+
This module for Nginx allows to set the flags "**HttpOnly**", "**secure**" and "**SameSite**" for cookies in the "*Set-Cookie*" response headers.
4546
The register of letters for the flags doesn't matter as it will be converted to the correct value. The order of cookie declaration among multiple directives doesn't matter too.
4647
It is possible to set a default value using symbol "*". In this case flags will be added to the all cookies if no other value for them is overriden.
4748

@@ -51,7 +52,7 @@ It is possible to set a default value using symbol "*". In this case flags will
5152

5253
-| -
5354
--- | ---
54-
**Syntax** | **set_cookie_flag** \<cookie_name\|*\> [HttpOnly\|secure] [HttpOnly\|secure];
55+
**Syntax** | **set_cookie_flag** \<cookie_name\|*\> [HttpOnly] [secure] [SameSite\|SameSite=[Lax|Strict]];
5556
**Default** | -
5657
**Context** | server, location
5758

0 commit comments

Comments
 (0)