-
-
Notifications
You must be signed in to change notification settings - Fork 247
Closed
Description
I notice that if a try to protect an entire blueprint with @jwt_required, than also the OPTIONS method is protected.
OPTIONS method should not include crendetials, see here.
The @jwt_required decorator should ignore OPTIONS like in flask_login:
@wraps(func)
def decorated_view(*args, **kwargs):
if request.method in EXEMPT_METHODS:
return func(*args, **kwargs)
elif current_app.login_manager._login_disabled:
return func(*args, **kwargs)
elif not current_user.is_authenticated:
return current_app.login_manager.unauthorized()
return func(*args, **kwargs)
return decorated_viewwhere EXEMPT_METHODS=set(["OPTIONS"])!
I could fix this and create a pull request if this is not a desired choice!
Metadata
Metadata
Assignees
Labels
No labels