Skip to content

Commit

Permalink
Merge pull request #3302 from colethorsen/feature/force_https
Browse files Browse the repository at this point in the history
force_https didn’t force https
  • Loading branch information
michalsn authored Jul 13, 2020
2 parents 4334459 + af0606d commit 538d56f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions system/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -447,13 +447,11 @@ function force_https(int $duration = 31536000, RequestInterface $request = null,

$baseURL = config(App::class)->baseURL;

// If we already use 'https' then return immediately
if (strpos($baseURL, 'https://') === 0)
{
return;
$baseURL = (string) substr($baseURL, strlen('https://'));
}

if (strpos($baseURL, 'http://') === 0)
elseif (strpos($baseURL, 'http://') === 0)
{
$baseURL = (string) substr($baseURL, strlen('http://'));
}
Expand Down

0 comments on commit 538d56f

Please sign in to comment.