From 029bfe105ed9de064173b00bd6c693c14f146be4 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Thu, 3 Sep 2026 16:09:08 +0000 Subject: [PATCH] Show public https URL in startup box for non-localhost sites --- pagerite/__main__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pagerite/__main__.py b/pagerite/__main__.py index 7d49941..15d892e 100644 --- a/pagerite/__main__.py +++ b/pagerite/__main__.py @@ -49,12 +49,18 @@ def main() -> None: # logging is already set up. if args.dbip: os.environ["PAGERITE_DBIP"] = "1" + run_args: dict = {} + if args.hostname != "localhost": + # A public site sits behind TLS on its hostname; show that URL in the + # startup box instead of the local listen address. + run_args["startup_box"] = f"{{Name}} {{version}}\nhttps://{args.hostname}" server.run( "pagerite.app:app", listen=args.listen, default_port=DEFAULT_PORT, server_header=False, reload=Path(__file__).parent if DEVMODE else False, + **run_args, )