Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Blocked Loading Mixed Active Content Issue Prevents Chart Viewing on Flexmeasures App #716

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions documentation/changelog.rst
Expand Up @@ -17,6 +17,7 @@ New features

Bugfixes
-----------
* Fix charts not always loading over https in secured scenarios [see `PR #716 <https://www.github.com/FlexMeasures/flexmeasures/pull/716>`_]

Infrastructure / Support
----------------------
Expand Down
3 changes: 3 additions & 0 deletions flexmeasures/ui/templates/base.html
Expand Up @@ -11,6 +11,9 @@
</title>
{% endblock head %}
<meta charset="windows-1252">
{% if flask_env != 'development' and flask_env != 'testing' %}
Flix6x marked this conversation as resolved.
Show resolved Hide resolved
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
{% endif %}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
Expand Down
1 change: 1 addition & 0 deletions flexmeasures/ui/utils/view_utils.py
Expand Up @@ -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
Expand Down