refactor: move proxy to monorepo

This commit is contained in:
2023-05-24 13:13:13 +02:00
parent 826eaa7825
commit 23d0c6971c
34 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
location /_static/ {
# use our custom request limit and allow bursts
limit_req zone=customstappslimit burst=20 nodelay;
{{{ cors }}}
if ($request_method = 'OPTIONS') {
{{{ cors }}}
add_header 'Content-Length' '0';
return 204;
}
alias /static/;
expires 7d;
## Check for file existing and if there, stop ##
if (-f $request_filename) {
break;
}
## Check for file existing and if there, stop ##
if (-d $request_filename) {
break;
}
##Check for png
if (-e $request_filename.png) {
rewrite ^/(.*)$ /$1.png;
break;
}
##Check for gif
if (-e $request_filename.gif) {
rewrite ^/(.*)$ /$1.gif;
break;
}
##Check for jpg
if (-e $request_filename.jpg) {
rewrite ^/(.*)$ /$1.jpg;
break;
}
##Fallback rule if no match is found
rewrite ^/(.*/).*(small|medium|large|thumbnail)$ /$1default-$2.png;
}