This commit is contained in:
@@ -16,11 +16,17 @@ def normalize_public_url(value: str) -> tuple[str, str]:
|
||||
raw = value.strip().rstrip("/")
|
||||
parsed = urlparse(raw)
|
||||
if parsed.scheme not in {"http", "https"} or not parsed.hostname:
|
||||
raise ConfigurationError("Gebruik een volledige http(s)-URL, bijvoorbeeld https://jobs.example.be")
|
||||
raise ConfigurationError(
|
||||
"Gebruik een volledige http(s)-URL, bijvoorbeeld https://jobs.example.be"
|
||||
)
|
||||
if parsed.username or parsed.password or parsed.query or parsed.fragment:
|
||||
raise ConfigurationError("De publieke URL mag geen credentials, query of fragment bevatten.")
|
||||
raise ConfigurationError(
|
||||
"De publieke URL mag geen credentials, query of fragment bevatten."
|
||||
)
|
||||
if parsed.path not in {"", "/"}:
|
||||
raise ConfigurationError("De applicatie moet op de root van het domein gepubliceerd worden.")
|
||||
raise ConfigurationError(
|
||||
"De applicatie moet op de root van het domein gepubliceerd worden."
|
||||
)
|
||||
try:
|
||||
port = parsed.port
|
||||
except ValueError as exc:
|
||||
|
||||
Reference in New Issue
Block a user