Permalink
Browse files

fixes #64

  • Loading branch information...
1 parent e337bd7 commit a0ebbc9bbe9978a62e3c1b36036d73ab05da11ae @pizzapanther committed Jun 20, 2012
Showing with 6 additions and 4 deletions.
  1. +5 −3 neutron/neutronide.py
  2. +1 −1 requirements.txt
View
@@ -103,7 +103,7 @@ def start_loop (args):
(r".*", tornado.web.FallbackHandler, {'fallback': wsgi_app}),
], debug=settings.DEBUG, gzip=True)
- if args.nossl:
+ if args.nossl or args.proxy:
ssl_options = None
else:
@@ -112,10 +112,11 @@ def start_loop (args):
'keyfile': settings.SERVER_KEY,
}
- http_server = tornado.httpserver.HTTPServer(application, ssl_options=ssl_options)
+ xheaders = args.proxy
+ http_server = tornado.httpserver.HTTPServer(application, xheaders=xheaders, ssl_options=ssl_options)
http_server.listen(settings.HTTP_PORT)
if ssl_options:
- http_server2 = tornado.httpserver.HTTPServer(application)
+ http_server2 = tornado.httpserver.HTTPServer(application, xheaders=xheaders)
http_server2.listen(settings.IMG_EDITOR_PORT)
io = tornado.ioloop.IOLoop.instance()
@@ -149,6 +150,7 @@ def stop_loop ():
parser.add_argument('-l', '--logging', action='store_true', dest='logging', help='Log to screen instead of file logging.')
parser.add_argument('-f', '--foreground', action='store_true', dest='foreground', help='Run in foreground instead of as a daemon.')
parser.add_argument('-n', '--nossl', action='store_true', dest='nossl', help='turn off ssl.')
+ parser.add_argument('-p', '--proxy', action='store_true', dest='proxy', help='Proxy mode. For running behind an HTTP Proxy. Turns off SSL also.')
parser.add_argument('action', nargs=1, help='start|stop|restart')
args = parser.parse_args()
View
@@ -3,5 +3,5 @@ south==0.7.3
django-celery==2.4.2
django-kombu==0.9.4
pyte==0.4.5
-tornado==2.2
+tornado==2.3
python-daemon==1.5.5

0 comments on commit a0ebbc9

Please sign in to comment.