From 6508ab24eaf2ec7a649fb099a127a0c4b25f5849 Mon Sep 17 00:00:00 2001
From: Ahmad-Wahid <59763365+Ahmad-Wahid@users.noreply.github.com>
Date: Thu, 8 Jun 2023 16:31:22 +0200
Subject: [PATCH 1/2] fixed production and development charts SSL issue
Signed-off-by: Ahmad-Wahid <59763365+Ahmad-Wahid@users.noreply.github.com>
---
flexmeasures/ui/templates/base.html | 3 +++
flexmeasures/ui/utils/view_utils.py | 1 +
2 files changed, 4 insertions(+)
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
From 594cbc29f8750d6cc74c09d6f5e352efd4c1e682 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nicolas=20H=C3=B6ning?=
Date: Fri, 9 Jun 2023 19:25:26 +0200
Subject: [PATCH 2/2] add changelog entry
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Nicolas Höning
---
documentation/changelog.rst | 1 +
1 file changed, 1 insertion(+)
diff --git a/documentation/changelog.rst b/documentation/changelog.rst
index 56b81a5ff..0a8689825 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
----------------------