Commit c31f001f authored by Taylor Otwell's avatar Taylor Otwell

fix url https bug.

parent e78c90b9
......@@ -63,7 +63,7 @@ class URL {
// If the application's URL configuration is set, we will just use that
// instead of trying to guess the URL from the $_SERVER array's host
// and script variables as this is more reliable.
// and script variables as this is a more reliable method.
if (($url = Config::get('application.url')) !== '')
{
$base = $url;
......@@ -112,6 +112,10 @@ class URL {
{
$root = preg_replace('~http://~', 'https://', $root, 1);
}
else
{
$root = preg_replace('~https://~', 'http://', $root, 1);
}
return rtrim($root, '/').'/'.ltrim($url, '/');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment