Skip to content

Commit

Permalink
LDP-97: Removed fetching url scheme. Comment fix. Use main host.
Browse files Browse the repository at this point in the history
  • Loading branch information
pagachdrunomics committed Apr 5, 2019
1 parent e4d36fd commit 11efad8
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions src/RequestMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,31 +171,18 @@ public static function getSiteVariables($site = NULL) {
* Variant name.
*
* @return string|null
* Variant url or null if variant incorrect.
* Variant hostname or null if variant incorrect.
*/
public function getHostForSiteVariant($variant) {
if (!in_array($variant, $this->variants)) {
return NULL;
}
$site_variables = static::getSiteVariables();
$variant_host = $variant . $this->variantSeparator . $site_variables['SITE_HOST'];
$variant_host = $variant . $this->variantSeparator . $site_variables['SITE_MAIN_HOST'];

return $variant_host;
}

/**
* Gets the url scheme.
*
* @return string
* Url scheme value from env var.
*/
public static function getUrlScheme() {
if ($url_scheme = getenv('URL_SCHEME')) {
return $url_scheme . "://";
}
return "//";
}

/**
* Gets the site variables as string.
*
Expand Down

0 comments on commit 11efad8

Please sign in to comment.