Базовая версия сервера API с авторизацией по протоколу OAuth2
This commit is contained in:
		
							
								
								
									
										23
									
								
								app/Http/Middleware/TrustProxies.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								app/Http/Middleware/TrustProxies.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace App\Http\Middleware;
 | 
			
		||||
 | 
			
		||||
use Fideloper\Proxy\TrustProxies as Middleware;
 | 
			
		||||
use Illuminate\Http\Request;
 | 
			
		||||
 | 
			
		||||
class TrustProxies extends Middleware
 | 
			
		||||
{
 | 
			
		||||
    /**
 | 
			
		||||
     * The trusted proxies for this application.
 | 
			
		||||
     *
 | 
			
		||||
     * @var array|string
 | 
			
		||||
     */
 | 
			
		||||
    protected $proxies;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * The headers that should be used to detect proxies.
 | 
			
		||||
     *
 | 
			
		||||
     * @var int
 | 
			
		||||
     */
 | 
			
		||||
    protected $headers = Request::HEADER_X_FORWARDED_ALL;
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user