We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cce0797 commit 79953d8Copy full SHA for 79953d8
nomad-conf/fastcgi.add
@@ -15,10 +15,7 @@
15
16
# Drop no cache cookie if need be
17
# (for some reason, add_header fails if included in prior if-block)
18
- if ($no_cache = "1") {
19
- add_header Set-Cookie "_mcnc=1; Max-Age=2; Path=/";
20
- add_header X-Microcachable "0";
21
- }
+
22
# Bypass cache if no-cache cookie is set
23
if ($http_cookie ~* "_mcnc") {
24
set $no_cache "1";
@@ -90,6 +87,10 @@
90
87
# you can use keep alive connections to the upstream be it
91
88
# FastCGI or Apache. If that's not the case comment out the line below.
92
89
fastcgi_keep_conn on; # keep alive to the FCGI upstream
+ if ($no_cache = "1") {
+ add_header Set-Cookie "_mcnc=1; Max-Age=2; Path=/";
+ add_header X-Microcachable "0";
93
+ }
94
}
95
location ~ /purge(/.*) {
96
fastcgi_cache_purge microcache "$scheme$host$request_uri$request_method";
0 commit comments