This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/passbook/lib/utils/urls.py
Jens Langhammer 79490984d1
add lib
2018-11-14 19:14:14 +01:00

8 lines
213 B
Python

"""URL-related utils"""
from urllib.parse import urlparse
def is_url_absolute(url):
"""Check if domain is absolute to prevent user from being redirect somewhere else"""
return bool(urlparse(url).netloc)