Apache Airflow version: 2.1.0
Environment:
- Cloud provider or hardware configuration: Azure
- OS (e.g. from /etc/os-release): RHEL8.3
- Kernel (e.g.
uname -a): Linux 7db15dac176b 5.10.25-linuxkit # 1 SMP Tue Mar 23 09:27:39 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
What happened:
When x_frame_enabled is default or set to true, embedding Airflow is not working since X-Frame-Options is set to "DENY"
What you expected to happen:
When x_frame_enabled is default or set to true, embedding Airflow is working
How to reproduce it:
leave x_frame_enabled to default or set it to true and try to embed it in an iFrame for instance and it will not work.
Setting it to "False" is the current workaround since the if condition does not seem to be correct.
Anything else we need to know:
broken code in Airflow 2:
|
def init_xframe_protection(app): |
if x_frame_enabled is enabled it will apply the DENY header, which was not the case in Airflow 1:
|
def apply_caching(response): |
since if was only setting the header in case it is NOT enabled.
Apache Airflow version: 2.1.0
Environment:
uname -a): Linux 7db15dac176b 5.10.25-linuxkit # 1 SMP Tue Mar 23 09:27:39 UTC 2021 x86_64 x86_64 x86_64 GNU/LinuxWhat happened:
When x_frame_enabled is default or set to true, embedding Airflow is not working since X-Frame-Options is set to "DENY"
What you expected to happen:
When x_frame_enabled is default or set to true, embedding Airflow is working
How to reproduce it:
leave x_frame_enabled to default or set it to true and try to embed it in an iFrame for instance and it will not work.
Setting it to "False" is the current workaround since the if condition does not seem to be correct.
Anything else we need to know:
broken code in Airflow 2:
airflow/airflow/www/extensions/init_security.py
Line 26 in 0801322
if x_frame_enabled is enabled it will apply the DENY header, which was not the case in Airflow 1:
airflow/airflow/www_rbac/app.py
Line 274 in d3b0669
since if was only setting the header in case it is NOT enabled.