diff --git a/config/galaxy.ini.sample b/config/galaxy.ini.sample index e7d313617f8..4a812734221 100644 --- a/config/galaxy.ini.sample +++ b/config/galaxy.ini.sample @@ -548,6 +548,9 @@ nglims_config_file = tool-data/nglims.yaml # Enable verbose debugging of Galaxy-managed dynamic proxy. #dynamic_proxy_debug=False +# The dynamic proxy is proxied by an external proxy (e.g. apache frontend to nodejs to wrap connections in SSL) +#dynamic_proxy_external_proxy=False + # -- Logging and Debugging # Verbosity of console log messages. Acceptable values can be found here: diff --git a/lib/galaxy/config.py b/lib/galaxy/config.py index 3e53e809808..aa4fb408a70 100644 --- a/lib/galaxy/config.py +++ b/lib/galaxy/config.py @@ -388,6 +388,7 @@ class Configuration( object ): self.dynamic_proxy_debug = string_as_bool( kwargs.get( "dynamic_proxy_debug", "False" ) ) self.dynamic_proxy_bind_port = int( kwargs.get( "dynamic_proxy_bind_port", "8800" ) ) self.dynamic_proxy_bind_ip = kwargs.get( "dynamic_proxy_bind_ip", "0.0.0.0" ) + self.dynamic_proxy_external_proxy = string_as_bool( kwargs.get( "dynamic_proxy_external_proxy", "False" ) ) # Default chunk size for chunkable datatypes -- 64k self.display_chunk_size = int( kwargs.get( 'display_chunk_size', 65536) ) diff --git a/lib/galaxy/web/proxy/__init__.py b/lib/galaxy/web/proxy/__init__.py index 373cee0d0ae..30738ad6c11 100644 --- a/lib/galaxy/web/proxy/__init__.py +++ b/lib/galaxy/web/proxy/__init__.py @@ -17,7 +17,7 @@ SECURE_COOKIE = "galaxysession" class ProxyManager(object): def __init__( self, config ): - for option in [ "manage_dynamic_proxy", "dynamic_proxy_bind_port", "dynamic_proxy_bind_ip", "dynamic_proxy_debug" ]: + for option in [ "manage_dynamic_proxy", "dynamic_proxy_bind_port", "dynamic_proxy_bind_ip", "dynamic_proxy_debug", "dynamic_proxy_external_proxy" ]: setattr( self, option, getattr( config, option ) ) self.launch_by = "node" # TODO: Support docker if self.manage_dynamic_proxy: @@ -43,7 +43,10 @@ class ProxyManager(object): if ':' in host: host = host[0:host.index(':')] scheme = trans.request.scheme - proxy_url = '%s://%s:%d' % (scheme, host, self.dynamic_proxy_bind_port) + if not self.dynamic_proxy_external_proxy: + proxy_url = '%s://%s:%d' % (scheme, host, self.dynamic_proxy_bind_port) + else: + proxy_url = '%s://%s' % (scheme, host) return { 'proxy_url': proxy_url, 'proxied_port': proxy_requests.port, diff --git a/test/base/interactor.py b/test/base/interactor.py index 9183585c69e..4ca5786d644 100644 --- a/test/base/interactor.py +++ b/test/base/interactor.py @@ -118,8 +118,9 @@ class GalaxyInteractorApi( object ): def wait_for_job( self, job_id, maxseconds ): self.twill_test_case.wait_for( lambda: not self.__job_ready( job_id ), maxseconds=maxseconds) - def get_job_stdio( self, job_id, stream ): + def get_job_stdio( self, job_id ): job_stdio = self.__get_job_stdio( job_id ).json() + return job_stdio def __get_job( self, job_id ): return self._get( 'jobs/%s' % job_id )