fix(nginx): sintonia conf
This commit is contained in:
parent
7049dfa80e
commit
4ce7c9f85e
1 changed files with 13 additions and 1 deletions
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen ${SINTONIA_LARAVEL_PORT};
|
listen ${SINTONIA_LARAVEL_PORT};
|
||||||
|
|
||||||
|
@ -14,7 +13,17 @@ server {
|
||||||
client_max_body_size 512M;
|
client_max_body_size 512M;
|
||||||
client_body_timeout 300s;
|
client_body_timeout 300s;
|
||||||
|
|
||||||
|
add_header Access-Control-Allow-Origin *;
|
||||||
|
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS, DELETE, PUT";
|
||||||
|
add_header Access-Control-Allow-Headers "Authorization, Content-Type, Accept";
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
|
if ($request_method = 'OPTIONS') {
|
||||||
|
add_header Access-Control-Allow-Origin *;
|
||||||
|
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS, DELETE, PUT";
|
||||||
|
add_header Access-Control-Allow-Headers "Authorization, Content-Type, Accept";
|
||||||
|
return 204;
|
||||||
|
}
|
||||||
try_files $uri $uri/ /index.php?$query_string;
|
try_files $uri $uri/ /index.php?$query_string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,6 +37,9 @@ server {
|
||||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||||
fastcgi_param SERVER_NAME sintonia;
|
fastcgi_param SERVER_NAME sintonia;
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
|
add_header Access-Control-Allow-Origin *;
|
||||||
|
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS, DELETE, PUT";
|
||||||
|
add_header Access-Control-Allow-Headers "Authorization, Content-Type, Accept";
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ /\.(?!well-known).* {
|
location ~ /\.(?!well-known).* {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue