Remove slash cleanup for OIDC discovery URL (#887)

Fixes #869
This commit is contained in:
Alex
2026-04-13 11:21:44 +01:00
committed by GitHub
parent a7694eb8ad
commit 98f891916d
2 changed files with 5 additions and 2 deletions
+1
View File
@@ -34,6 +34,7 @@ def on_save_security(
normalized_values["OIDC_DISCOVERY_URL"] = normalize_http_url(
str(discovery_url),
default_scheme="https",
strip_trailing_slash=False,
)
proxy_logout_url = normalized_values.get("PROXY_AUTH_LOGOUT_URL")
+4 -2
View File
@@ -435,7 +435,9 @@ class TestSecurityOnSave:
assert result["error"] is False
def test_on_save_normalizes_oidc_discovery_url(self, tmp_path, monkeypatch):
def test_on_save_normalizes_oidc_discovery_url_without_stripping_trailing_slash(
self, tmp_path, monkeypatch
):
from shelfmark.config.security import _on_save_security
monkeypatch.setenv("CONFIG_DIR", str(tmp_path))
@@ -446,7 +448,7 @@ class TestSecurityOnSave:
assert result["error"] is False
assert (
result["values"]["OIDC_DISCOVERY_URL"]
== "https://auth.example.com/.well-known/openid-configuration"
== "https://auth.example.com/.well-known/openid-configuration/"
)
def test_on_save_normalizes_proxy_logout_url(self, tmp_path, monkeypatch):