nixos/kanidm: allow origin url ending without slash (#355216)

This commit is contained in:
Sefa Eyeoglu 2024-11-22 13:44:09 +01:00 committed by GitHub
commit baa412f46d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -515,13 +515,13 @@ in
};
originUrl = mkOption {
description = "The origin URL of the service. OAuth2 redirects will only be allowed to sites under this origin. Must end with a slash.";
description = "The redirect URL of the service. These need to exactly match the OAuth2 redirect target";
type =
let
originStrType = types.strMatching ".*://.*/$";
originStrType = types.strMatching ".*://.*$";
in
types.either originStrType (types.nonEmptyListOf originStrType);
example = "https://someservice.example.com/";
example = "https://someservice.example.com/auth/login";
};
originLanding = mkOption {