[manual] Add get_events URL routing

The new nginx configuration file needs to be copied to
/etc/nginx/humbug-include and nginx needs to be restarted when this
commit is deployed.

(imported from commit 6c43f3c2c7a6acee6a852c672c96a38bda01dd0d)
This commit is contained in:
Zev Benjamin
2013-03-26 13:06:52 -04:00
parent 8f4eaa63ad
commit 401fa6063e
4 changed files with 8 additions and 3 deletions

View File

@@ -61,8 +61,9 @@ class Resource(resource.Resource):
def getChild(self, name, request):
request.requestHeaders.setRawHeaders('X-Forwarded-Host', [proxy_host])
if request.uri in ['/json/get_updates', '/api/v1/get_messages'] or \
request.uri.startswith('/api/v1/messages/latest'):
if (request.uri in ['/json/get_updates', '/api/v1/get_messages', '/json/get_events'] or
request.uri.startswith('/api/v1/messages/latest') or
request.uri.startswith('/api/v1/events')):
return proxy.ReverseProxyResource('localhost', tornado_port, '/'+name)
return proxy.ReverseProxyResource('localhost', django_port, '/'+name)