Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
option added from $_SERVER[‘HTTP_X_FORWARDED_PROTO']
Browse files Browse the repository at this point in the history
  • Loading branch information
mkorkmaz committed Aug 3, 2018
1 parent 418ab04 commit eead6c5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/BaseUrlExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ public static function getBaseUrl(array $httpServerData) : string

public static function getProtocol(array $httpServerData) : string
{
if (isset($httpServerData['HTTP_X_FORWARDED_PROTO'])) {
return $httpServerData['HTTP_X_FORWARDED_PROTO'];
}
return isset($httpServerData['HTTPS']) && $httpServerData['HTTPS'] !== 'Off' ? 'https': 'http';
}

Expand Down

0 comments on commit eead6c5

Please sign in to comment.