Skip to content

Commit

Permalink
Add .sso subdomain for RequestUtils::getContextFromHost for proper de…
Browse files Browse the repository at this point in the history
…tection on localhost
  • Loading branch information
mathieu-ducrot committed Aug 28, 2024
1 parent b2bcc63 commit 8976624
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/Utils/RequestUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ public static function getContextFromHost(string $host, ?string $domain = null):
// MDT fallback in case there is no subdomain and the host is different from the domain
$toReturn = 'app';
if (
str_starts_with($host, 'app.') ||
str_starts_with($host, 'admin.') ||
str_starts_with($host, 'api.') ||
str_starts_with($host, 'extranet.') ||
substr_count($host, '.') > 1
str_starts_with($host, 'app.')
|| str_starts_with($host, 'admin.')
|| str_starts_with($host, 'api.')
|| str_starts_with($host, 'extranet.')
|| str_starts_with($host, 'sso.')
|| substr_count($host, '.') > 1
) {
$toReturn = substr($host, 0, (int) strpos($host, '.'));
}
Expand Down

0 comments on commit 8976624

Please sign in to comment.