fix 405 error in docker

This commit is contained in:
j3d1 2019-12-17 14:10:46 +01:00
parent 08b1a62dc6
commit 083b6f1f18
7 changed files with 39 additions and 5 deletions

View file

@ -0,0 +1,9 @@
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains;";
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
add_header Access-Control-Allow-Origin '*';
client_max_body_size 50m;

View file

@ -0,0 +1,7 @@
rewrite '^/1/images/([0-9a-fA-F]{32})/?$' /staticimages/$1 last;
rewrite '^/1/thumbs/([0-9a-fA-F]{32})/?$' /thumbnails/$1 last;
# rewrite '^/thumbnails/([0-9a-fA-F]{32})$' /thumbnail.php?id=$1 last;
location /thumbnails/ {
try_files $uri /thumbnail.php?id=$uri;
}

View file

@ -0,0 +1,15 @@
location / {
if ($request_method = OPTIONS) {
add_header Content-Length 0;
add_header Content-Type text/plain;
add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS";
add_header Access-Control-Allow-Origin '*'; #$http_origin;
add_header Access-Control-Allow-Headers "Authorization, Content-Type";
add_header Access-Control-Allow-Credentials true;
return 200;
}
try_files $uri $uri/ /index.php?$query_string;
}