Skip to content

Commit

Permalink
fix: OPTIONS header
Browse files Browse the repository at this point in the history
  • Loading branch information
akdasa committed Mar 24, 2023
1 parent afa299c commit 2297c66
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions endpoints.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ location / {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' '*';

if ($request_method = 'OPTIONS') {
add_header 'Content-Length' 0;
return 204;
}
}

proxy_redirect off;
Expand Down

0 comments on commit 2297c66

Please sign in to comment.