Urls
| FUNCTION | DESCRIPTION |
|---|---|
normalize_url |
S3- aware URL normalization. |
url_is_relative_to |
S3-aware replacement for |
url_join |
S3-aware replacement for |
verify_url_is_relative_to |
Fail if |
Functions:¶
normalize_url(url)
¶
S3- aware URL normalization.
For local paths, this is just os.path.normpath.
For S3 URLs, this just strips trailing slashes. Notably, we do NOT want to
collapse :// into :/.
Source code in fractal_server/urls.py
url_is_relative_to(*, url, base)
¶
S3-aware replacement for Path(url).is_relative_to(base).
Source code in fractal_server/urls.py
url_join(base, *parts)
¶
S3-aware replacement for os.path.join.
Source code in fractal_server/urls.py
verify_url_is_relative_to(*, url, base)
¶
Fail if url is not relative to base.