Skip to content

Commit

Permalink
Try out a messy nginx config
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Cameron <[email protected]>
  • Loading branch information
JasonLovesDoggo committed Oct 26, 2024
1 parent cb6c5f5 commit 708dcb4
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions dmoj/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ http {


charset utf-8;
try_files $uri @icons;
error_page 502 504 /502.html;


Expand All @@ -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;
Expand Down

0 comments on commit 708dcb4

Please sign in to comment.