planiverse

A minimalist, no-JS front-end for Mastodon.
git clone https://git.stjo.hn/planiverse
Log | Files | Refs | README | LICENSE

TrustProxies.php (697B)


      1 <?php
      2 
      3 namespace App\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 }