From 4ce00ba6f73ae91fe294cf583e41bd20ff2350d5 Mon Sep 17 00:00:00 2001 From: Robin Sonnabend <robin@fsmpi.rwth-aachen.de> Date: Tue, 9 Apr 2019 19:07:11 +0200 Subject: [PATCH] Fix non-CDN_URL case Close #223 --- configproxy.py | 2 +- templates/layout.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configproxy.py b/configproxy.py index 28c95d8..35e12fb 100755 --- a/configproxy.py +++ b/configproxy.py @@ -159,7 +159,7 @@ def check_security(SECRET_KEY, SECURITY_KEY, SESSION_PROTECTION): check_choice("SESSION_PROTECTION", SESSION_PROTECTION, ["strong"]) -def check_server_name(SERVER_NAME, PREFERRED_URL_SCHEME): +def check_server_name(SERVER_NAME, PREFERRED_URL_SCHEME, CDN_URL): # todo: check ip address and server name check_choice( "PREFERRED_URL_SCHEME", PREFERRED_URL_SCHEME, diff --git a/templates/layout.html b/templates/layout.html index c0a2e89..2719fd3 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -5,7 +5,7 @@ <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content="Protokollsystem" /> - {% if config.CDN_URL is defined %} + {% if config.CDN_URL is defined and config.CDN_URL is not none %} <link rel="stylesheet" href="{{[config.CDN_URL, "bootstrap/css/bootstrap.min.css"]|join("/")}}"> {% else %} <link rel="stylesheet" href="{{url_for("static", filename="css/bootstrap.min.css")}}"> @@ -77,7 +77,7 @@ Diese Seite ist leer. {% endblock %} </div> -{% if config.CDN_URL is defined %} +{% if config.CDN_URL is defined and config.CDN_URL is not none %} <script src="{{[config.CDN_URL, "jquery/jquery.min.js"]|join("/")}}"></script> <script src="{{[config.CDN_URL, "bootstrap/js/bootstrap.min.js"]|join("/")}}"></script> {% else %} -- GitLab