]> BookStack Code Mirror - bookstack/blob - app/Http/Request.php
Fixed occurances of altered titles in search results
[bookstack] / app / Http / Request.php
1 <?php
2
3 namespace BookStack\Http;
4
5 use Illuminate\Http\Request as LaravelRequest;
6
7 class Request extends LaravelRequest
8 {
9     /**
10      * Override the default request methods to get the scheme and host
11      * to set the custom APP_URL, if set.
12      *
13      * @return \Illuminate\Config\Repository|mixed|string
14      */
15     public function getSchemeAndHttpHost()
16     {
17         $base = config('app.url', null);
18
19         if ($base) {
20             $base = trim($base, '/');
21         } else {
22             $base = $this->getScheme() . '://' . $this->getHttpHost();
23         }
24
25         return $base;
26     }
27 }
Morty Proxy This is a proxified and sanitized view of the page, visit original site.