mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix visit content server in browser not working when the content server is configured to listen on an IPv6 interface. Fixes #2023737 [[Bug] When set content server to listen on IPv4 and IPv6 address, Calibre won't launch broswer when Click "Visit content server in broswer"](https://bugs.launchpad.net/calibre/+bug/2023737)
This commit is contained in:
parent
bdf0999304
commit
ffcaf382a2
@ -23,6 +23,8 @@ def local_url_for_content_server():
|
||||
protocol = 'https' if opts.ssl_certfile and opts.ssl_keyfile else 'http'
|
||||
prefix = opts.url_prefix or ''
|
||||
port = opts.port
|
||||
if ':' in interface:
|
||||
interface = f'[{interface}]'
|
||||
return f'{protocol}://{interface}:{port}{prefix}'
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user