fix 405 error in docker
This commit is contained in:
parent
08b1a62dc6
commit
083b6f1f18
7 changed files with 39 additions and 5 deletions
9
container/web/general.conf
Normal file
9
container/web/general.conf
Normal 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;
|
7
container/web/images.conf
Normal file
7
container/web/images.conf
Normal 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;
|
||||
}
|
15
container/web/location-root.conf
Normal file
15
container/web/location-root.conf
Normal 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;
|
||||
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue