diff --git a/documentation/changelog.rst b/documentation/changelog.rst index 1288983ec..40583a3dc 100644 --- a/documentation/changelog.rst +++ b/documentation/changelog.rst @@ -17,6 +17,7 @@ New features Bugfixes ----------- +* Fix charts not always loading over https in secured scenarios [see `PR #716 `_] Infrastructure / Support ---------------------- diff --git a/flexmeasures/ui/templates/base.html b/flexmeasures/ui/templates/base.html index edbf456ee..3198b4a8f 100644 --- a/flexmeasures/ui/templates/base.html +++ b/flexmeasures/ui/templates/base.html @@ -11,6 +11,9 @@ {% endblock head %} + {% if flask_env != 'development' and flask_env != 'testing' %} + + {% endif %} diff --git a/flexmeasures/ui/utils/view_utils.py b/flexmeasures/ui/utils/view_utils.py index ae622ba77..0c9bf07da 100644 --- a/flexmeasures/ui/utils/view_utils.py +++ b/flexmeasures/ui/utils/view_utils.py @@ -25,6 +25,7 @@ def render_flexmeasures_template(html_filename: str, **variables): """Render template and add all expected template variables, plus the ones given as **variables.""" + variables["flask_env"] = current_app.env variables["documentation_exists"] = False if os.path.exists( "%s/static/documentation/html/index.html" % flexmeasures_ui.root_path