forked from indymedia/epicyon
Show news front page
parent
a3b1d1b23f
commit
56e1a6acd6
34
daemon.py
34
daemon.py
|
@ -9109,8 +9109,11 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
'GET busy time',
|
'GET busy time',
|
||||||
'permitted directory')
|
'permitted directory')
|
||||||
|
|
||||||
if self.path.startswith('/login') or \
|
# show the login screen
|
||||||
(self.path == '/' and not authorized):
|
if (self.path.startswith('/login') or
|
||||||
|
(self.path == '/' and
|
||||||
|
not authorized and
|
||||||
|
not self.server.newsInstance)):
|
||||||
# request basic auth
|
# request basic auth
|
||||||
msg = htmlLogin(self.server.translate,
|
msg = htmlLogin(self.server.translate,
|
||||||
self.server.baseDir).encode('utf-8')
|
self.server.baseDir).encode('utf-8')
|
||||||
|
@ -9122,6 +9125,33 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
'login shown')
|
'login shown')
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# show the news front page
|
||||||
|
if self.path == '/' and \
|
||||||
|
not authorized and \
|
||||||
|
self.server.newsInstance:
|
||||||
|
if callingDomain.endswith('.onion') and \
|
||||||
|
self.server.onionDomain:
|
||||||
|
self._logout_redirect('http://' +
|
||||||
|
self.server.onionDomain +
|
||||||
|
'/users/news', None,
|
||||||
|
callingDomain)
|
||||||
|
elif (callingDomain.endswith('.i2p') and
|
||||||
|
self.server.i2pDomain):
|
||||||
|
self._logout_redirect('http://' +
|
||||||
|
self.server.i2pDomain +
|
||||||
|
'/users/news', None,
|
||||||
|
callingDomain)
|
||||||
|
else:
|
||||||
|
self._logout_redirect(self.server.httpPrefix +
|
||||||
|
'://' +
|
||||||
|
self.server.domainFull +
|
||||||
|
'/users/news',
|
||||||
|
None, callingDomain)
|
||||||
|
self._benchmarkGETtimings(GETstartTime, GETtimings,
|
||||||
|
'permitted directory',
|
||||||
|
'news front page shown')
|
||||||
|
return
|
||||||
|
|
||||||
self._benchmarkGETtimings(GETstartTime, GETtimings,
|
self._benchmarkGETtimings(GETstartTime, GETtimings,
|
||||||
'permitted directory',
|
'permitted directory',
|
||||||
'login shown done')
|
'login shown done')
|
||||||
|
|
Loading…
Reference in New Issue