Skip to content

Commit

Permalink
remove cors from nginx conf
Browse files Browse the repository at this point in the history
  • Loading branch information
matyson committed May 21, 2024
1 parent ba0717a commit 454b37c
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,6 @@ http {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'Content-Type, Origin, Accept, Authorization, X-Request-With, X-API-KEY';
add_header 'Access-Control-Allow-Credentials' 'true';

if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'Content-Type, Origin, Accept, Authorization, X-Request-With, X-API-KEY';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Content-Length' 0;
add_header 'Content-Type' 'text/plain; charset=utf-8';
return 204;
}
}
}
}

0 comments on commit 454b37c

Please sign in to comment.