Skip to content

Commit

Permalink
Allow creds
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyui committed Aug 8, 2024
1 parent b46e7e6 commit 7a12073
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions sites-enabled/next.conf
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ server {
}

location ~ /api/v1/(authenticate|users/(\d+)) {
add_header 'Access-Control-Allow-Origin' $cors_allowed_origin always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, PATCH, DELETE, OPTIONS';
add_header 'Access-Control-Allow-Headers' '*';
# if ($request_method = OPTIONS) {
# return 200;
# }
if ($request_method = OPTIONS) {
add_header 'Access-Control-Allow-Origin' $cors_allowed_origin always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, PATCH, DELETE, OPTIONS';
add_header 'Access-Control-Allow-Headers' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
return 200;
}

limit_req zone=users_zone burst=10 nodelay;
limit_req_status 429;
Expand Down

0 comments on commit 7a12073

Please sign in to comment.