Enforce token auth for odic config PUT call

This commit is contained in:
Samuel Oechsler
2024-10-30 20:35:01 +01:00
parent 7ef52d8ed4
commit 1a030a6ddd
4 changed files with 21 additions and 12 deletions

View File

@ -59,8 +59,11 @@ function fetch(verb, path, data, options) {
},
beforeSend: function (xhr) {
// allow unauthenticated access to OIDC configuration
if (path === 'settings/oidc-config') return;
// Allow unauthenticated access to get the oidc configuration
if (path === 'settings/oidc-config' && verb === "get") {
return;
}
xhr.setRequestHeader('Authorization', 'Bearer ' + (token ? token.t : null));
},