diff --git a/dmoj/nginx/nginx.conf b/dmoj/nginx/nginx.conf index 1d5bf6c..9624acf 100644 --- a/dmoj/nginx/nginx.conf +++ b/dmoj/nginx/nginx.conf @@ -67,7 +67,6 @@ http { charset utf-8; - try_files $uri @icons; error_page 502 504 /502.html; @@ -77,15 +76,15 @@ http { root /assets/; } - location @icons { + location ~ ^/(android-chrome-(?:144x144|192x192|256x256|36x36|384x384|48x48|512x512|72x72|96x96)\.png|apple-touch-icon\.png|browserconfig\.xml|favicon-(?:16x16|32x32)\.png|favicon\.ico|logo\.(?:png|svg)|manifest\.json|mstile-(?:144x144|150x150|310x150|310x310|70x70)\.png|old\.png|safari-pinned-tab\.svg|site\.webmanifest)$ { - alias /assets/resources/icons/; - log_not_found off; - error_page 403 = @uwsgi; - error_page 404 = @uwsgi; + # Future dev: just change the url of these so you can add an easy location block to catch all icons Until + # then, this is easy and it works. + alias /assets/resources/icons/$1; + access_log off; } - location @uwsgi { + location / { # see https://stackoverflow.com/a/56487286/18516611 set $target_host site;