diff --git a/providers/fab/src/airflow/providers/fab/www/app.py b/providers/fab/src/airflow/providers/fab/www/app.py index 0ab94e4b7adb9..765d942ccc7a4 100644 --- a/providers/fab/src/airflow/providers/fab/www/app.py +++ b/providers/fab/src/airflow/providers/fab/www/app.py @@ -59,6 +59,14 @@ def create_app(enable_plugins: bool): from airflow.providers.fab.auth_manager.fab_auth_manager import FabAuthManager flask_app = Flask(__name__) + + @flask_app.after_request + def remove_duplicate_date_header(response): + # Remove the application-level Date header so the ASGI/WSGI server + # can emit a single Date header for the final response. + response.headers.pop("Date", None) + return response + flask_app.secret_key = conf.get("api", "SECRET_KEY") flask_app.config["SQLALCHEMY_DATABASE_URI"] = conf.get("database", "SQL_ALCHEMY_CONN") flask_app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False