From 48fa51c0c2509d417ca1cd6ca2b5808df18ab849 Mon Sep 17 00:00:00 2001 From: Alek Evans Date: Sat, 6 Jul 2024 13:40:36 -0800 Subject: [PATCH] No longer serve user generated content from primary domain --- nginx/nginx.conf | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index f1961b5..57ac0d9 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -84,15 +84,14 @@ server { include /var/www-data/nginx/nginx-errors.conf; root /var; # Enable cache for user generated content, but require revalidation - add_header Cache-Control "public, no-cache, must-revalidate, stale-if-error=60, stale-while-revalidate=10"; add_header Access-Control-Allow-Origin $cors_allow_origin always; add_header Access-Control-Allow-Headers $cors_allow_headers always; add_header Access-Control-Allow-Methods $cors_allow_methods always; add_header Access-Control-Allow-Credentials "true" always; add_header Access-Control-Max-Age $cors_max_age always; add_header Access-Control-Expose-Headers $cors_expose_headers always; - try_files /www-uploads/$uri @frontend; - location @frontend { + # No longer serve UGC (User Generated Content) from primary domain + location ~ ^/(.*) { # Cache domain specific pages on Cloudflare but not on the browser, add_header Cache-Control "public, max-age=0, s-maxage=77760000"; add_header Access-Control-Allow-Origin "https://alekeagle.me" always;