mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-27 06:01:54 +03:00
.github
app
Actions
Api
Auth
Config
Console
Entities
Exceptions
Facades
Http
Controllers
Middleware
Requests
Kernel.php
Request.php
Interfaces
Notifications
Providers
Settings
Traits
Translation
Uploads
Application.php
Model.php
helpers.php
bootstrap
database
dev
public
resources
routes
storage
tests
themes
.env.example
.env.example.complete
.gitattributes
.gitignore
LICENSE
artisan
composer.json
composer.lock
crowdin.yml
docker-compose.yml
package-lock.json
package.json
phpcs.xml
phpunit.xml
readme.md
server.php
version
26 lines
583 B
PHP
26 lines
583 B
PHP
<?php namespace BookStack\Http;
|
|
|
|
use Illuminate\Http\Request as LaravelRequest;
|
|
|
|
class Request extends LaravelRequest
|
|
{
|
|
|
|
/**
|
|
* Override the default request methods to get the scheme and host
|
|
* to set the custom APP_URL, if set.
|
|
* @return \Illuminate\Config\Repository|mixed|string
|
|
*/
|
|
public function getSchemeAndHttpHost()
|
|
{
|
|
$base = config('app.url', null);
|
|
|
|
if ($base) {
|
|
$base = trim($base, '/');
|
|
} else {
|
|
$base = $this->getScheme().'://'.$this->getHttpHost();
|
|
}
|
|
|
|
return $base;
|
|
}
|
|
}
|