Loading-screen default false
This commit is contained in:
parent
53a820c07c
commit
2dac04d1a4
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user