Skip to content

Commit 79953d8

Browse files
committed
Update fastcgi.add
1 parent cce0797 commit 79953d8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

nomad-conf/fastcgi.add

+5-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@
1515

1616
# Drop no cache cookie if need be
1717
# (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-
}
18+
2219
# Bypass cache if no-cache cookie is set
2320
if ($http_cookie ~* "_mcnc") {
2421
set $no_cache "1";
@@ -90,6 +87,10 @@
9087
# you can use keep alive connections to the upstream be it
9188
# FastCGI or Apache. If that's not the case comment out the line below.
9289
fastcgi_keep_conn on; # keep alive to the FCGI upstream
90+
if ($no_cache = "1") {
91+
add_header Set-Cookie "_mcnc=1; Max-Age=2; Path=/";
92+
add_header X-Microcachable "0";
93+
}
9394
}
9495
location ~ /purge(/.*) {
9596
fastcgi_cache_purge microcache "$scheme$host$request_uri$request_method";

0 commit comments

Comments
 (0)