TOS screen uses onion address

main
Bob Mottram 2020-03-28 17:32:49 +00:00
parent b2e44d4129
commit 582ef93556
1 changed files with 9 additions and 3 deletions

View File

@ -1260,9 +1260,15 @@ class PubServer(BaseHTTPRequestHandler):
self._benchmarkGETtimings(GETstartTime,GETtimings,10) self._benchmarkGETtimings(GETstartTime,GETtimings,10)
if self.path.startswith('/terms'): if self.path.startswith('/terms'):
msg=htmlTermsOfService(self.server.baseDir, \ if not callingDomain.endswith('.onion') or \
self.server.httpPrefix, \ not self.server.onionDomain:
self.server.domainFull).encode() msg=htmlTermsOfService(self.server.baseDir, \
self.server.httpPrefix, \
self.server.domainFull).encode()
else:
msg=htmlTermsOfService(self.server.baseDir, \
self.server.httpPrefix, \
self.server.onionDomain).encode()
self._login_headers('text/html',len(msg),callingDomain) self._login_headers('text/html',len(msg),callingDomain)
self._write(msg) self._write(msg)
return return