确认AD认证是否正确配置,包括AD域名,LDAP绑定用户和密码等。
确认Flask-Login中的COOKIE_SECURE选项是否正确配置。
确认web服务器配置是否正确,特别是对于Apache设置HTTP头文件“HTTP_X_FORWARDED_PROTO”,例如:
如果使用Nginx,则需要配置proxy_set_header选项,例如:
location / { proxy_pass http://airflow; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; }
确认代理服务器是否正确配置。如果使用非标准端口号,则需要在特定端口上设置代理服务器。
在Airflow的webserver_config.py文件中设置BASE_URL为https而不是http,例如:
BASE_URL = 'https://your.airflow.instance.com/'
在Airflow的配置文件 airflow.cfg中设置https,例如:
[webserver] base_url = https://your.airflow.instance.com/
最后,重新启动Airflow并清除浏览器缓存和Cookie。
参考文献:https://github.com/apache/airflow/issues/10847