forked from indymedia/epicyon
Sequence
parent
91981c7953
commit
208f929f1f
38
daemon.py
38
daemon.py
|
@ -559,8 +559,26 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.GETbusy=False
|
||||
return
|
||||
|
||||
if self.path.startswith('/terms'):
|
||||
msg=htmlTermsOfService(self.server.baseDir, \
|
||||
self.server.httpPrefix, \
|
||||
self.server.domainFull).encode()
|
||||
self._login_headers('text/html',len(msg))
|
||||
self.wfile.write(msg)
|
||||
self.server.GETbusy=False
|
||||
return
|
||||
|
||||
if self.path.startswith('/about'):
|
||||
msg=htmlAbout(self.server.baseDir, \
|
||||
self.server.httpPrefix, \
|
||||
self.server.domainFull).encode()
|
||||
self._login_headers('text/html',len(msg))
|
||||
self.wfile.write(msg)
|
||||
self.server.GETbusy=False
|
||||
return
|
||||
|
||||
# if not authorized then show the login screen
|
||||
if htmlGET and self.path!='/login' and self.path!='/' and self.path!='/terms':
|
||||
if htmlGET and self.path!='/login' and self.path!='/':
|
||||
if '/media/' not in self.path and \
|
||||
'/sharefiles/' not in self.path and \
|
||||
'/statuses/' not in self.path and \
|
||||
|
@ -784,24 +802,6 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.GETbusy=False
|
||||
return
|
||||
|
||||
if self.path.startswith('/terms'):
|
||||
msg=htmlTermsOfService(self.server.baseDir, \
|
||||
self.server.httpPrefix, \
|
||||
self.server.domainFull).encode()
|
||||
self._login_headers('text/html',len(msg))
|
||||
self.wfile.write(msg)
|
||||
self.server.GETbusy=False
|
||||
return
|
||||
|
||||
if self.path.startswith('/about'):
|
||||
msg=htmlAbout(self.server.baseDir, \
|
||||
self.server.httpPrefix, \
|
||||
self.server.domainFull).encode()
|
||||
self._login_headers('text/html',len(msg))
|
||||
self.wfile.write(msg)
|
||||
self.server.GETbusy=False
|
||||
return
|
||||
|
||||
if self.path.startswith('/login') or self.path=='/':
|
||||
# request basic auth
|
||||
msg=htmlLogin(self.server.baseDir).encode('utf-8')
|
||||
|
|
Loading…
Reference in New Issue