]> BookStack Code Mirror - bookstack/blob - app/Http/Middleware/TrustProxies.php
Add socialite authentication for okta
[bookstack] / app / Http / Middleware / TrustProxies.php
1 <?php
2
3 namespace BookStack\Http\Middleware;
4
5 use Illuminate\Http\Request;
6 use Fideloper\Proxy\TrustProxies as Middleware;
7
8 class TrustProxies extends Middleware
9 {
10     /**
11      * The trusted proxies for this application.
12      *
13      * @var array
14      */
15     protected $proxies;
16
17     /**
18      * The current proxy header mappings.
19      *
20      * @var array
21      */
22     protected $headers = [
23         Request::HEADER_FORWARDED => 'FORWARDED',
24         Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR',
25         Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST',
26         Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT',
27         Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO',
28     ];
29 }