mirror of
https://github.com/jupyter/notebook.git
synced 2025-03-19 13:20:36 +08:00
Merge pull request #3372 from minrk/cookiename
base default cookie name on request host+port
This commit is contained in:
commit
874ee503cd
@ -147,7 +147,10 @@ class AuthenticatedHandler(RequestHandler):
|
||||
|
||||
@property
|
||||
def cookie_name(self):
|
||||
return self.settings.get('cookie_name', '')
|
||||
default_cookie_name = 'username-{host}'.format(
|
||||
host=self.request.host,
|
||||
).replace(':', '-')
|
||||
return self.settings.get('cookie_name', default_cookie_name)
|
||||
|
||||
@property
|
||||
def password(self):
|
||||
|
@ -166,7 +166,6 @@ class NotebookWebApplication(web.Application):
|
||||
# authentication
|
||||
cookie_secret=os.urandom(1024),
|
||||
login_url=url_path_join(base_project_url,'/login'),
|
||||
cookie_name='username-%s' % uuid.uuid4(),
|
||||
read_only=ipython_app.read_only,
|
||||
password=ipython_app.password,
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user