authorization: bypass authorization check when the request method is OPTIONS
If CORS is enabled then then OPTIONS should always return 204. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
4a61bf21de
commit
490e66fe07
|
@ -450,7 +450,8 @@ class Authorization:
|
|||
return None
|
||||
|
||||
def check_authorized(self, request):
|
||||
if request.path in self.permitted_paths:
|
||||
if request.path in self.permitted_paths or \
|
||||
request.method == "OPTIONS":
|
||||
return None
|
||||
|
||||
# Check JSON Web Token
|
||||
|
|
Loading…
Reference in New Issue