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

[7.x] allow to reset forced scheme and root-url #34039

Merged
merged 2 commits into from Aug 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Illuminate/Routing/UrlGenerator.php
Expand Up @@ -616,25 +616,25 @@ public function getDefaultParameters()
/**
* Force the scheme for URLs.
*
* @param string $scheme
* @param string|null $scheme
* @return void
*/
public function forceScheme($scheme)
{
$this->cachedScheme = null;

$this->forceScheme = $scheme.'://';
$this->forceScheme = $scheme ? $scheme.'://' : null;
}

/**
* Set the forced root URL.
*
* @param string $root
* @param string|null $root
* @return void
*/
public function forceRootUrl($root)
{
$this->forcedRoot = rtrim($root, '/');
$this->forcedRoot = $root ? rtrim($root, '/') : null;

$this->cachedRoot = null;
}
Expand Down