Mercurial > code > home > repos > light9
diff bin/homepageConfig @ 1217:e703b3434dbd
websocket and web cleanup
Ignore-this: ac6bd0444bc03ee79ce71c4aa7740bc0
author | Drew Perttula <drewp@bigasterisk.com> |
---|---|
date | Mon, 08 Jun 2015 02:08:25 +0000 |
parents | 0d295af23c4b |
children | 70f42f9d6e04 |
line wrap: on
line diff
--- a/bin/homepageConfig Mon Jun 08 00:38:49 2015 +0000 +++ b/bin/homepageConfig Mon Jun 08 02:08:25 2015 +0000 @@ -18,7 +18,18 @@ continue path = current.value(role, L9['urlPath']) server = server.rstrip('/') - print "location /%(path)s { proxy_pass %(server)s; rewrite /[^/]+/(.*) /$1 break; }" % vars() + print """ + location /%(path)s { + + # for websocket + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $host; + + proxy_pass %(server)s; + rewrite /[^/]+/(.*) /$1 break; + }""" % vars() reactor.stop()