Skip to content

Commit

Permalink
No longer serve user generated content from primary domain
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekEagle committed Jul 6, 2024
1 parent 320f7db commit 48fa51c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 48fa51c

Please sign in to comment.