Skip to content

Commit

Permalink
Add other cloudflare hints to the nginx config
Browse files Browse the repository at this point in the history
  • Loading branch information
MTecknology committed Feb 21, 2024
1 parent 3a84bd3 commit a772e92
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions states/nginx/configs/soberpage.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ server {

# Forward to external domain
server_name *.sobersupport.group;
return 302 $canonical_redirect;
return 304 $canonical_redirect;

# Increase cache lifetime
add_header Cloudflare-CDN-Cache-Control max-age=43200;
add_header Cache-Control "public";
add_header Pragma public;
expires 1d;
Expand Down Expand Up @@ -48,7 +49,8 @@ server {
return 301 $cf_scheme://$fwd.sobersupport.group$request_uri;

# Increase cache lifetime
add_header Cloudflare-CDN-Cache-Control max-age=86400;
add_header Cache-Control "public";
add_header Pragma public;
expires 7d;
expires max;
}

0 comments on commit a772e92

Please sign in to comment.