mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1294 (Content Server doesn't asks for username and password when accessed)
This commit is contained in:
parent
14abab6a74
commit
2303bfa951
@ -132,10 +132,11 @@ class LibraryServer(object):
|
||||
'tools.gzip.mime_types': ['text/html', 'text/plain', 'text/xml', 'text/javascript', 'text/css'],
|
||||
}}
|
||||
if opts.password:
|
||||
g = self.config['global']
|
||||
g['tools.digest_auth.on'] = True
|
||||
g['tools.digest_auth.realm'] = _('Password to access your calibre library. Username is ') + opts.username.strip()
|
||||
g['tools.digest_auth.users'] = {opts.username.strip():opts.password.strip()}
|
||||
self.config['/'] = {
|
||||
'tools.digest_auth.on' : True,
|
||||
'tools.digest_auth.realm' : _('Password to access your calibre library. Username is ') + opts.username.strip(),
|
||||
'tools.digest_auth.users' : {opts.username.strip():opts.password.strip()},
|
||||
}
|
||||
|
||||
self.is_running = False
|
||||
self.exception = None
|
||||
|
Loading…
x
Reference in New Issue
Block a user