Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

force_https didn’t force https #3302

Merged
merged 2 commits into from
Jul 13, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
else if (strpos($baseURL, 'http://') === 0)
colethorsen marked this conversation as resolved.
Show resolved Hide resolved
{
$baseURL = (string) substr($baseURL, strlen('http://'));
}
Expand Down