nixos/kanidm: allow origin url ending without slash

This commit is contained in:
Patrick 2024-11-11 15:29:40 +01:00
parent ae725bafb3
commit 6728211ec8
No known key found for this signature in database
GPG Key ID: 451F95EFB8BECD0F

View File

@ -502,13 +502,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 {