Skip to content

Commit

Permalink
fix(nginx): skip return 403 for OPTIONS method in auth configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Nov 9, 2024
1 parent cb82a2f commit 18a62c3
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ if ( $http_authorization ~ ^Alwatr\s+([A-z0-9_=-]+):([A-z0-9_=-]+)$ ) {
set $authUserToken $2;
}

# Skip return 403 when method is OPTIONS and continue processing
if ($request_method = OPTIONS) {
break;
}
if ($userLocation = 0) {
return 403;
}

0 comments on commit 18a62c3

Please sign in to comment.