This commit is contained in:
cryptoguard 2025-04-01 15:01:05 -04:00
parent 0a706df907
commit 2813ba7930

View file

@ -646,7 +646,9 @@ class HttpHandler(BaseHTTPRequestHandler):
if not self.is_authenticated():
if page == "json":
self.putHeaders(401, "application/json")
self.wfile.write(json.dumps({"error": "Unauthorized"}).encode("utf-8"))
self.wfile.write(
json.dumps({"error": "Unauthorized"}).encode("utf-8")
)
return
else:
self.send_response(302)