[
https://issues.apache.org/jira/browse/AIRFLOW-4517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16841143#comment-16841143
]
ASF GitHub Bot commented on AIRFLOW-4517:
-----------------------------------------
mb-m commented on pull request #5289: [AIRFLOW-4517] allow for airflow config
to influence flask configuration
URL: https://github.com/apache/airflow/pull/5289
Add the ability to use a [flask_web] section to set flask configuration
variables. This is particularly useful with the introduction of origin=
on some of the dags.html page links (trigger, particularly), as without
it, there's no way of specifying https in the url_for() flask function.
Right now, without a good framework for seeing the effect of flask vars,
it's difficult to write a perfect test, but I've added something that showed
me it was there.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> origin scheme and other flask-based configurations cannot be set
> ----------------------------------------------------------------
>
> Key: AIRFLOW-4517
> URL: https://issues.apache.org/jira/browse/AIRFLOW-4517
> Project: Apache Airflow
> Issue Type: Bug
> Components: cli, webserver
> Affects Versions: 1.10.3
> Reporter: Matthew Byng-Maddick
> Priority: Major
> Labels: newbie, patch
> Attachments: airflow_flask_web.patch
>
>
> {{airflow/cli.py:webserver()}} contains the ability through {{cache_app()}}
> and {{create_app()}} (and the RBAC versions) to configure flask, but then
> nails them to {{None}}.
> The attached patch (against v1-10-stable) adds a new "flask_web" section to
> the configuration where keys are upper-cased and then sent to the flask
> configuration. This allows one to set the flask {{PREFERRED_URL_SCHEME}}
> configuration which affects the {{origin=}} url-parameter for re-triggering
> (this one should probably be handled better, but this allows one to work
> around in flask) on the main admin dags.html view.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)