Skip to content

Commit

Permalink
[fix] Removed certificate and https code. Use the webserver instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
hhirsch committed Jan 3, 2015
1 parent b6de521 commit 7b6adb9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 70 deletions.
21 changes: 2 additions & 19 deletions plugins/webapp/webapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,6 @@ def check(user, passwd):
def init_site():
_site.scan_posts(really=True)

class MySSLCherryPy(ServerAdapter):
def run(self, handler):
#from cherrypy import _cpwsgiserver3
from cherrypy import wsgiserver
#server = _cpwsgiserver3.CherryPyWSGIServer((self.host, self.port), handler)
server = wsgiserver.CherryPyWSGIServer((self.host, self.port), handler)
# If cert variable is a valid path, SSL will be used
# You can set it to None to disable SSL
cert = 'server.pem' # certificate path
server.ssl_certificate = cert
server.ssl_private_key = cert
try:
server.start()
finally:
server.stop()

server_names['mysslcherrypy'] = MySSLCherryPy
class Webapp(Command):

name = "webapp"
Expand Down Expand Up @@ -91,8 +74,8 @@ def _execute(self, options, args):
init_site()
port = options and options.get('port')
if options and options.get('browser'):
webbrowser.open('https://localhost:{0}'.format(port))
b.run(host='localhost', port=port, server='mysslcherrypy')
webbrowser.open('http://localhost:{0}'.format(port))
b.run(host='localhost', port=port)
@staticmethod
@b.route('/')
@b.auth_basic(check)
Expand Down
51 changes: 0 additions & 51 deletions server.pem

This file was deleted.

0 comments on commit 7b6adb9

Please sign in to comment.