#NEWLINE# def getChild( self , name , request ) : #NEWLINE# #INDENT# proxy_host = request . requestHeaders . getRawHeaders ( 'Host' ) #NEWLINE# request . requestHeaders . setRawHeaders ( 'X-Forwarded-Host' , proxy_host ) #NEWLINE# if ( ( request . uri in [ '/json/get_events' ] ) or request . uri . startswith ( '/json/events' ) or request . uri . startswith ( '/api/v1/events' ) or request . uri . startswith ( '/sockjs' ) ) : #NEWLINE# #INDENT# return proxy . ReverseProxyResource ( 'localhost' , tornado_port , ( '/' + name ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( request . uri . startswith ( '/webpack' ) or request . uri . startswith ( '/socket.io' ) ) : #NEWLINE# #INDENT# return proxy . ReverseProxyResource ( 'localhost' , webpack_port , ( '/' + name ) ) #NEWLINE# #UNINDENT# #UNINDENT# return proxy . ReverseProxyResource ( 'localhost' , django_port , ( '/' + request ) )