This is an automated email from the ASF dual-hosted git repository.
kalyanr pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 62cf4070801 remove outdated comment in SimpleAllAdminMiddleware
(#49756)
62cf4070801 is described below
commit 62cf4070801ccf8969dd8bf9e566e2efdcfad903
Author: Kalyan R <[email protected]>
AuthorDate: Fri Apr 25 22:44:14 2025 +0530
remove outdated comment in SimpleAllAdminMiddleware (#49756)
* remove comment
---
airflow-core/src/airflow/api_fastapi/auth/managers/simple/middleware.py | 2 --
1 file changed, 2 deletions(-)
diff --git
a/airflow-core/src/airflow/api_fastapi/auth/managers/simple/middleware.py
b/airflow-core/src/airflow/api_fastapi/auth/managers/simple/middleware.py
index 6c73cd015fa..536442cf5bf 100644
--- a/airflow-core/src/airflow/api_fastapi/auth/managers/simple/middleware.py
+++ b/airflow-core/src/airflow/api_fastapi/auth/managers/simple/middleware.py
@@ -27,8 +27,6 @@ class SimpleAllAdminMiddleware(BaseHTTPMiddleware):
"""Middleware that automatically generates and includes auth header for
simple auth manager."""
async def dispatch(self, request: Request, call_next):
- # Starlette Request is expected to be immutable, but we modify it to
add the auth header
- # https://github.com/fastapi/fastapi/issues/2727#issuecomment-770202019
token = SimpleAuthManagerLogin.create_token_all_admins()
request.scope["headers"].append((b"authorization", f"Bearer
{token}".encode()))
return await call_next(request)