mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Make the cookie_path an attribute on trans so that consumers don't need
to duplicate logic. Unfortunately it isn't usable for the proxy setup since trans isn't available when the command line is generated.
This commit is contained in:
committed by
John Chilton
parent
449932b229
commit
58d311f2e0
@@ -88,7 +88,7 @@ class InteractiveEnvironmentRequest(object):
|
||||
self.attr.proxy_prefix = '/'.join(
|
||||
(
|
||||
'',
|
||||
(self.attr.galaxy_config.cookie_path or '/').strip('/'),
|
||||
trans.cookie_path.strip('/'),
|
||||
self.attr.galaxy_config.dynamic_proxy_prefix.strip('/'),
|
||||
self.attr.viz_id,
|
||||
)
|
||||
|
||||
@@ -620,12 +620,16 @@ class GalaxyWebTransaction(base.DefaultWebTransaction,
|
||||
# self.log_event( "Automatically created account '%s'", user.email )
|
||||
return user
|
||||
|
||||
@property
|
||||
def cookie_path(self):
|
||||
return self.app.config.cookie_path or url_for('/')
|
||||
|
||||
def __update_session_cookie(self, name='galaxysession'):
|
||||
"""
|
||||
Update the session cookie to match the current session.
|
||||
"""
|
||||
self.set_cookie(self.security.encode_guid(self.galaxy_session.session_key),
|
||||
name=name, path=self.app.config.cookie_path or url_for('/'))
|
||||
name=name, path=self.cookie_path)
|
||||
|
||||
def check_user_library_import_dir(self, user):
|
||||
if getattr(self.app.config, "user_library_import_dir_auto_creation", False):
|
||||
|
||||
@@ -13,6 +13,7 @@ from galaxy.util import (
|
||||
)
|
||||
from galaxy.util.filelock import FileLock
|
||||
from galaxy.util.lazy_process import LazyProcess, NoOpLazyProcess
|
||||
from galaxy.web.framework import url_for
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -148,7 +149,7 @@ class GolangProxyLauncher(object):
|
||||
config.dynamic_proxy_bind_port,
|
||||
),
|
||||
"--listenPath", "/".join((
|
||||
(config.cookie_path or '/'),
|
||||
(config.cookie_path or url_for('/')),
|
||||
config.dynamic_proxy_prefix
|
||||
)),
|
||||
"--cookieName", "galaxysession",
|
||||
|
||||
Reference in New Issue
Block a user