Skip to content

Commit

Permalink
fixed production and development charts SSL issue
Browse files Browse the repository at this point in the history
Signed-off-by: Ahmad-Wahid <59763365+Ahmad-Wahid@users.noreply.github.com>
  • Loading branch information
Ahmad-Wahid committed Jun 8, 2023
1 parent e4c77cc commit 6508ab2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions flexmeasures/ui/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
</title>
{% endblock head %}
<meta charset="windows-1252">
{% if flask_env != 'development' and flask_env != 'testing' %}
<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
Original file line number Diff line number Diff line change
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

0 comments on commit 6508ab2

Please sign in to comment.