diff --git a/flask_security/decorators.py b/flask_security/decorators.py index 356b569..6a011fb 100644 --- a/flask_security/decorators.py +++ b/flask_security/decorators.py @@ -154,7 +154,7 @@ def auth_required(*auth_methods): if _security._unauthorized_callback: return _security._unauthorized_callback() else: - return _get_unauthorized_response() + return _get_unauthorized_response(headers=h) return decorated_view return wrapper