From 0296e16232581b6b70a564044f954d0aedf31b1e Mon Sep 17 00:00:00 2001 From: Min RK Date: Thu, 16 Nov 2017 13:53:27 +0100 Subject: [PATCH] allow override of cookie options via `tornado_settings['cookie_options']` for cases where default options are incorrect or insufficient (e.g. expiry or https detection fails) --- jupyterhub/handlers/base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jupyterhub/handlers/base.py b/jupyterhub/handlers/base.py index 1d6638bc..b99f5fc8 100644 --- a/jupyterhub/handlers/base.py +++ b/jupyterhub/handlers/base.py @@ -265,6 +265,8 @@ class BaseHandler(RequestHandler): kwargs['secure'] = True if self.subdomain_host: kwargs['domain'] = self.domain + + kwargs.update(self.settings.get('cookie_options', {})) self.log.debug("Setting cookie for %s: %s, %s", user.name, server.cookie_name, kwargs) self.set_secure_cookie( server.cookie_name,