File tree Expand file tree Collapse file tree 2 files changed +3
-42
lines changed
airflow-core/src/airflow/api_fastapi/core_api Expand file tree Collapse file tree 2 files changed +3
-42
lines changed Original file line number Diff line number Diff line change 30
30
from starlette .templating import Jinja2Templates
31
31
32
32
from airflow .api_fastapi .auth .tokens import get_signing_key
33
- from airflow .api_fastapi .core_api .middleware import FlaskExceptionsMiddleware
34
33
from airflow .exceptions import AirflowException
35
34
from airflow .settings import AIRFLOW_PATH
36
35
@@ -176,8 +175,9 @@ def init_error_handlers(app: FastAPI) -> None:
176
175
def init_middlewares (app : FastAPI ) -> None :
177
176
from airflow .configuration import conf
178
177
179
- app .add_middleware (FlaskExceptionsMiddleware )
180
- if conf .getboolean ("core" , "simple_auth_manager_all_admins" ):
178
+ if "SimpleAuthManager" in conf .get ("core" , "auth_manager" ) and conf .getboolean (
179
+ "core" , "simple_auth_manager_all_admins"
180
+ ):
181
181
from airflow .api_fastapi .auth .managers .simple .middleware import SimpleAllAdminMiddleware
182
182
183
183
app .add_middleware (SimpleAllAdminMiddleware )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments