Browse Source

Implement automatic redirection of HTTP to HTTPS, when server is set to HTTPS-only.

Required a patch of CherryPy (wsgiserver/__init__.py).
tags/0.6.3
ShyPike 14 years ago
parent
commit
62f4647117
  1. 8
      SABnzbd.py
  2. BIN
      cherrypy.zip

8
SABnzbd.py

@ -1356,12 +1356,14 @@ def main():
# Wait for server to become ready
cherrypy.engine.wait(cherrypy.process.wspbus.states.STARTED)
if not autorestarted:
if enable_https:
launch_a_browser("https://%s:%s/sabnzbd" % (browserhost, cherryport))
browser_url = "https://%s:%s/sabnzbd" % (browserhost, cherryport)
cherrypy.wsgiserver.REDIRECT_URL = browser_url
else:
launch_a_browser("http://%s:%s/sabnzbd" % (browserhost, cherryport))
browser_url = "http://%s:%s/sabnzbd" % (browserhost, cherryport)
if not autorestarted:
launch_a_browser(browser_url)
notify("SAB_Launched", None)
osx.sendGrowlMsg('SABnzbd %s' % (sabnzbd.__version__),"http://%s:%s/sabnzbd" % (browserhost, cherryport),osx.NOTIFICATION['startup'])
# Now's the time to check for a new version

BIN
cherrypy.zip

Binary file not shown.
Loading…
Cancel
Save