diff --git a/lib/galaxy/config.py b/lib/galaxy/config.py index 8fac06f69cd..8a927244cdd 100644 --- a/lib/galaxy/config.py +++ b/lib/galaxy/config.py @@ -203,7 +203,7 @@ class Configuration(object): tempfile.tempdir = self.new_file_path self.shared_home_dir = kwargs.get("shared_home_dir", None) self.openid_consumer_cache_path = resolve_path(kwargs.get("openid_consumer_cache_path", "database/openid_consumer_cache"), self.root) - self.cookie_path = kwargs.get("cookie_path", "/") + self.cookie_path = kwargs.get("cookie_path", None) self.enable_quotas = string_as_bool(kwargs.get('enable_quotas', False)) self.enable_unique_workflow_defaults = string_as_bool(kwargs.get('enable_unique_workflow_defaults', False)) self.tool_path = resolve_path(kwargs.get("tool_path", "tools"), self.root) diff --git a/lib/galaxy/visualization/plugins/interactive_environments.py b/lib/galaxy/visualization/plugins/interactive_environments.py index d3131cba7ba..26571e31d6c 100644 --- a/lib/galaxy/visualization/plugins/interactive_environments.py +++ b/lib/galaxy/visualization/plugins/interactive_environments.py @@ -88,7 +88,7 @@ class InteractiveEnvironmentRequest(object): self.attr.proxy_prefix = '/'.join( ( '', - self.attr.galaxy_config.cookie_path.strip('/'), + (self.attr.galaxy_config.cookie_path or '/').strip('/'), self.attr.galaxy_config.dynamic_proxy_prefix.strip('/'), self.attr.viz_id, ) diff --git a/lib/galaxy/web/framework/webapp.py b/lib/galaxy/web/framework/webapp.py index 95662602a6d..2ac12204139 100644 --- a/lib/galaxy/web/framework/webapp.py +++ b/lib/galaxy/web/framework/webapp.py @@ -625,7 +625,7 @@ class GalaxyWebTransaction(base.DefaultWebTransaction, 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) + name=name, path=self.app.config.cookie_path or url_for('/')) def check_user_library_import_dir(self, user): if getattr(self.app.config, "user_library_import_dir_auto_creation", False): diff --git a/lib/galaxy/web/proxy/__init__.py b/lib/galaxy/web/proxy/__init__.py index 4702c5c277d..94c73335b2c 100644 --- a/lib/galaxy/web/proxy/__init__.py +++ b/lib/galaxy/web/proxy/__init__.py @@ -148,7 +148,7 @@ class GolangProxyLauncher(object): config.dynamic_proxy_bind_port, ), "--listenPath", "/".join(( - config.cookie_path, + (config.cookie_path or '/'), config.dynamic_proxy_prefix )), "--cookieName", "galaxysession", diff --git a/lib/galaxy/webapps/reports/config.py b/lib/galaxy/webapps/reports/config.py index 89a9373476e..7f44096bb9a 100644 --- a/lib/galaxy/webapps/reports/config.py +++ b/lib/galaxy/webapps/reports/config.py @@ -48,7 +48,7 @@ class Configuration(object): self.blog_url = kwargs.get('blog_url', None) self.screencasts_url = kwargs.get('screencasts_url', None) self.log_events = False - self.cookie_path = kwargs.get("cookie_path", "/") + self.cookie_path = kwargs.get("cookie_path", None) # Error logging with sentry self.sentry_dsn = kwargs.get('sentry_dsn', None) diff --git a/lib/galaxy/webapps/tool_shed/config.py b/lib/galaxy/webapps/tool_shed/config.py index 8fef0ca1944..412ee196c49 100644 --- a/lib/galaxy/webapps/tool_shed/config.py +++ b/lib/galaxy/webapps/tool_shed/config.py @@ -66,7 +66,7 @@ class Configuration(object): # Where dataset files are stored self.file_path = resolve_path(kwargs.get("file_path", "database/community_files"), self.root) self.new_file_path = resolve_path(kwargs.get("new_file_path", "database/tmp"), self.root) - self.cookie_path = kwargs.get("cookie_path", "/") + self.cookie_path = kwargs.get("cookie_path", None) self.enable_quotas = string_as_bool(kwargs.get('enable_quotas', False)) self.id_secret = kwargs.get("id_secret", "changethisinproductiontoo") # Tool stuff