Loading-screen default false
All checks were successful
Build on push / prepare (push) Successful in 15s
Build on push / build-api (push) Successful in 32s
Build on push / build-redirector (push) Successful in 33s
Build on push / build-web (push) Successful in 59s

This commit is contained in:
Sven Heidemann 2025-03-11 18:49:43 +01:00
parent 53a820c07c
commit 2dac04d1a4
2 changed files with 6 additions and 1 deletions

View File

@ -29,6 +29,9 @@ class ShortUrl(DbModelABC):
self._description = description
self._group_id = group_id
self._domain_id = domain_id
if loading_screen is None or loading_screen == "":
loading_screen = False
self._loading_screen = loading_screen
@property

View File

@ -164,7 +164,9 @@ async def _track_visit(r: Request, short_url: dict):
def _get_redirect_url(url: str) -> str:
if not url.startswith("http://") and not url.startswith("https://"):
protocols = Environment.get("PROTOCOLS", list[str], ["http", "https"])
if not any(url.startswith(f"{protocol}://") for protocol in protocols):
url = f"http://{url}"
return url