Show regular login on direct Stimmatelier entry

This commit is contained in:
Mikei386 committed 2026-10-19 12:40:22 +02:00
1 parent 2664ea8bd8
commit 0659967f36
3 files changed
+36 -4

No files matched your search

+4 -2
View File
@@ -467,10 +467,12 @@ class Handler(BaseHTTPRequestHandler):
return self.access_status()
if self.path == '/login.js':
return self.respond((ROOT/'login.js').read_bytes(), mime='text/javascript')
if not self.authenticated() and self.path in ('/', '/stimmatelier/'):
# Serve the normal login at the studio entry too. Its successful
# reload returns to the same page; APIs/assets remain protected.
return self.respond((ROOT/'login.html').read_bytes(), mime='text/html; charset=utf-8')
if not self.authenticated() and self.path not in ('/', '/style.css'):
return self.respond({'error':'Anmeldung erforderlich.'},401)
if not self.authenticated() and self.path == '/':
return self.respond((ROOT/'login.html').read_bytes(), mime='text/html; charset=utf-8')
if self.path.startswith('/stimmatelier/'):
try:
from stimmatelier_proxy import asset