diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2021-12-11 10:17:08 -0500 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2021-12-11 10:18:04 -0500 |
| commit | 1bfe29f2eb0ff5cb0c7f38fc07bec6649e7e13f1 (patch) | |
| tree | c0fa27d8acf5f70ef51edd95e8380bb17648cb4e /nginx | |
| parent | 84b3ec2dc2e8ae9b29a7278a661d3f7e1dcb5b83 (diff) | |
rename push cookie for clarity
Diffstat (limited to 'nginx')
| -rw-r--r-- | nginx/nginx.conf | 8 | ||||
| -rw-r--r-- | nginx/snippets/preload.conf | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/nginx/nginx.conf b/nginx/nginx.conf index b85a4c95..674b2e8d 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -77,13 +77,17 @@ http { /index.html ", </phone.png>; rel=preload; as=image"; } + map $http_cookie $clear_legacy_push_cookie { + ~__Host-preload= "__Host-preload=; HttpOnly; Secure; SameSite=Lax; Path=/; Max-Age=0"; + } + map $http_cookie $nopush { - ~__Host-preload=1 1; + ~__Host-push=1 1; default 0; } map $nopush $push_cookie { - 0 "__Host-preload=1; HttpOnly; Secure; SameSite=Lax; Path=/"; + 0 "__Host-push=1; HttpOnly; Secure; SameSite=Lax; Path=/"; } map $nopush $push_stylesheet { diff --git a/nginx/snippets/preload.conf b/nginx/snippets/preload.conf index 96db1dc0..7e3f9a06 100644 --- a/nginx/snippets/preload.conf +++ b/nginx/snippets/preload.conf @@ -1,4 +1,5 @@ add_header Link "<{{path|/main.css}}>; rel=preload; as=style; integrity={{integrity|/main.css}}, </fonts/roboto-v29-regular-latin.woff2>; rel=preload; as=font; crossorigin, </fonts/roboto-v29-bold-latin.woff2>; rel=preload; as=font; crossorigin, <{{path|/mask-icon.svg}}>; rel=preload; as=image$preload_resources_uri" always; +add_header Set-Cookie $clear_legacy_push_cookie always; add_header Set-Cookie $push_cookie always; http2_push $push_stylesheet; http2_push $push_font_regular; |
