mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Allow redirecting to proxy_host directly
Not a good idea if you actually use subdomain routing in a upstream reverse proxy, but convenient for local development ... .
This commit is contained in:
@@ -1707,13 +1707,25 @@
|
||||
:Type: bool
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
``interactivetools_upstream_proxy``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
:Description:
|
||||
Set this to false to redirect users of Interacitve tools directly
|
||||
to the Interactive tools proxy. `interactivetools_upstream_proxy`
|
||||
should only be set to false in development.
|
||||
:Default: ``true``
|
||||
:Type: bool
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
``interactivetools_proxy_host``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
:Description:
|
||||
Proxy host - assumed to just be hosted on the same hostname and
|
||||
port as Galaxy by default.
|
||||
Hostname and port of Interactive tools proxy. It is assumed to be
|
||||
hosted on the same hostname and port as Galaxy by default.
|
||||
:Default: ``None``
|
||||
:Type: str
|
||||
|
||||
|
||||
@@ -921,8 +921,13 @@ galaxy:
|
||||
# Enable InteractiveTools.
|
||||
#interactivetools_enable: false
|
||||
|
||||
# Proxy host - assumed to just be hosted on the same hostname and port
|
||||
# as Galaxy by default.
|
||||
# Set this to false to redirect users of Interacitve tools directly to
|
||||
# the Interactive tools proxy. `interactivetools_upstream_proxy`
|
||||
# should only be set to false in development.
|
||||
#interactivetools_upstream_proxy: true
|
||||
|
||||
# Hostname and port of Interactive tools proxy. It is assumed to be
|
||||
# hosted on the same hostname and port as Galaxy by default.
|
||||
#interactivetools_proxy_host: null
|
||||
|
||||
# Base path for interactive tools running at a subpath without a
|
||||
|
||||
@@ -1231,11 +1231,19 @@ mapping:
|
||||
desc: |
|
||||
Enable InteractiveTools.
|
||||
|
||||
interactivetools_upstream_proxy:
|
||||
type: bool
|
||||
default: true
|
||||
required: false
|
||||
desc:
|
||||
Set this to false to redirect users of Interacitve tools directly to the Interactive tools proxy.
|
||||
`interactivetools_upstream_proxy` should only be set to false in development.
|
||||
|
||||
interactivetools_proxy_host:
|
||||
type: str
|
||||
required: false
|
||||
desc: |
|
||||
Proxy host - assumed to just be hosted on the same hostname and port as
|
||||
Hostname and port of Interactive tools proxy. It is assumed to be hosted on the same hostname and port as
|
||||
Galaxy by default.
|
||||
|
||||
interactivetools_base_path:
|
||||
|
||||
@@ -253,6 +253,8 @@ class InteractiveToolManager:
|
||||
def target_if_active(self, trans, entry_point):
|
||||
if entry_point.active and not entry_point.deleted:
|
||||
request_host = trans.request.host
|
||||
if not self.app.config.interactivetools_upstream_proxy and self.app.config.interactivetools_proxy_host:
|
||||
request_host = self.app.config.interactivetools_proxy_host
|
||||
protocol = trans.request.host_url.split('//', 1)[0]
|
||||
if entry_point.requires_domain:
|
||||
rval = f'{protocol}//{self.get_entry_point_subdomain(trans, entry_point)}.{request_host}/'
|
||||
|
||||
Reference in New Issue
Block a user