This commit is contained in:
nora 2022-09-03 16:43:02 +02:00
parent 34c728b922
commit 07fb7a6796

View file

@ -51,13 +51,12 @@ http {
server_name "api.cors-school.nilstrieb.dev";
location / {
add_header 'Access-Control-Allow-Origin' 'https://cors-school.nilstrieb.dev';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, DELETE, PUT, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,token,refresh-token,Authorization';
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' 'https://cors-school.nilstrieb.dev';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, DELETE, PUT, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,token,refresh-token,Authorization';
return 204;
}