Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

fix: formatting for proxied url (#3214)

Dylan Madisetti53e5fe695c67
diff --git a/marimo/_server/print.py b/marimo/_server/print.py
index b464873815..0fb286630e 100644
--- a/marimo/_server/print.py
+++ b/marimo/_server/print.py
@@ -77,8 +77,13 @@ def _colorized_url(url_string: str) -> str:
else:
query = ""
+ url_string = f"{url.scheme}://{url.hostname}"
+ # raw https and http urls do not have a port to parse
+ if url.port:
+ url_string += f":{url.port}"
+
return bold(
- f"{url.scheme}://{url.hostname}:{url.port}{url.path}{query}",
+ f"{url_string}{url.path}{query}",
)