This commit is contained in:
nora 2022-09-03 16:26:12 +02:00
parent f8a7c18de8
commit d6f6729c83

View file

@ -51,8 +51,17 @@ http {
server_name "api.cors-school.nilstrieb.dev";
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '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' 'token,refresh-token';
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}
proxy_pass http://cors-school-backend:8080/;
add_header Access-Control-Allow-Origin cors-school.nilstrieb.dev;
}
}