diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/CAS.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/CAS.pm index 8f6c9c2f0..9d9745d3e 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/CAS.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/CAS.pm @@ -527,8 +527,10 @@ sub getCasApp { } } - # Try to match host - $hostnameConfKey = $app if ( $hostname eq $candidateHost ); + # Try to match host, only if strict matching is disabled + unless ( $self->conf->{casStrictMatching} ) { + $hostnameConfKey = $app if ( $hostname eq $candidateHost ); + } } # Application found by prefix has priority