Root is the login page

master
Bob Mottram 2019-08-15 14:40:27 +01:00
parent 1206ae72fa
commit 50a1232574
1 changed files with 2 additions and 2 deletions

View File

@ -461,7 +461,7 @@ class PubServer(BaseHTTPRequestHandler):
# if not authorized then show the login screen
if self.headers.get('Accept'):
if 'text/html' in self.headers['Accept'] and self.path!='/login' and self.path!='/terms':
if 'text/html' in self.headers['Accept'] and self.path!='/login' and self.path!='/' and self.path!='/terms':
if '/media/' not in self.path and \
'/sharefiles/' not in self.path and \
'/statuses/' not in self.path and \
@ -688,7 +688,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.GETbusy=False
return
if self.path.startswith('/login'):
if self.path.startswith('/login') or self.path=='/':
# request basic auth
msg=htmlLogin(self.server.baseDir).encode('utf-8')
self._login_headers('text/html',len(msg))