From 4f119e7a1bcc708ecefc67a801093caa61331c46 Mon Sep 17 00:00:00 2001 From: Matthew Welch Date: Sun, 23 Jan 2022 16:02:36 -0800 Subject: [PATCH] Fix login --- rpiWebApp.py | 3 ++- templates/login.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/rpiWebApp.py b/rpiWebApp.py index 97b1ec6..256ac06 100644 --- a/rpiWebApp.py +++ b/rpiWebApp.py @@ -377,7 +377,8 @@ def resource_not_found(e): def handle_unauthorized(): temp = login() t = make_response(temp) - t.headers['WWW-Authenticate'] = 'Basic realm="Access to the staging site"' + if "/get_" in request.path: + t.headers["WWW-Authenticate"] = 'Basic realm="Access to the staging site"' return t, 401 diff --git a/templates/login.html b/templates/login.html index 5b5cc3d..720f7f8 100644 --- a/templates/login.html +++ b/templates/login.html @@ -2,7 +2,7 @@ {% block content %}
-
+