wordpress-nginx-main/globals/wpfc.conf
hhftechnologies dd82b3e56c update
2024-09-28 17:48:20 +05:30

34 lines
938 B
Text

# The rewrite magic
location / {
gzip_static on;
# set these globally, if not done already
# gzip_http_version 1.1;
# gzip_proxied expired no-cache no-store private auth;
# gzip_disable "MSIE [1-6]\.";
# gzip_vary on;
error_page 418 = @cachemiss;
if ($request_method = POST) { return 418; }
if ($query_string != "") { return 418; }
if ($http_cookie ~* "wordpress_logged_in_") { return 418; }
if ($http_cookie ~* "comment_author_") { return 418; }
if ($http_cookie ~* "wp_postpass_") { return 418; }
try_files "/wp-content/cache/all${uri}index.html" =418;
add_header "X-WPFC-Cache" "HIT";
# choose or modify any of the following cache-control headers
expires 30m;
# add_header "Cache-Control" "max-age=10, must-revalidate";
# add_header "Vary" "Cookie";
}
location @cachemiss {
try_files $uri $uri/ /index.php$is_args$args;
}