- Adjusted some protocol recognition into var to match proxy's one
This commit is contained in:
		
							parent
							
								
									2b81e9cef8
								
							
						
					
					
						commit
						18a0fd7fdc
					
				| @ -168,18 +168,19 @@ class UrlExtension implements Extension { | |||||||
| 
 | 
 | ||||||
|     protected function isHttps() : bool |     protected function isHttps() : bool | ||||||
|     { |     { | ||||||
|         $header = in_array('https', array_map("strtolower", [ |         $https = in_array('https', array_map("strtolower", [ | ||||||
|  |             $_SERVER['REQUEST_SCHEME'] ?? "", | ||||||
|             $_SERVER['X-Url-Scheme'] ?? "", |             $_SERVER['X-Url-Scheme'] ?? "", | ||||||
|             $_SERVER['Front-End-Https'] ?? "", |             $_SERVER['Front-End-Https'] ?? "", | ||||||
|             $_SERVER['X-Forwarded-Ssl'] ?? "", |  | ||||||
|             $_SERVER['X-Forwarded-Proto'] ?? "", |             $_SERVER['X-Forwarded-Proto'] ?? "", | ||||||
|             $_SERVER['X-Forwarded-Protocol'] ?? "", |             $_SERVER['X-Forwarded-Protocol'] ?? "", | ||||||
|  |             $_SERVER['HTTP_X_FORWARDED_PROTO'] ?? "", | ||||||
|  |             $_SERVER['HTTP_X_FORWARDED_PROTOCOL'] ?? "", | ||||||
|         ])) || isset($_SERVER['HTTP_X_ARR_SSL']); |         ])) || isset($_SERVER['HTTP_X_ARR_SSL']); | ||||||
| 
 | 
 | ||||||
|         return $header |         return $https | ||||||
|             || ( "443" === ( $_SERVER['SERVER_PORT'] ?? "" ) ) |             || ( "443" === ( $_SERVER['SERVER_PORT'] ?? "" ) ) | ||||||
|             || ( "https" === ( $_SERVER['REQUEST_SCHEME'] ?? "http") ) |             || ( "off" !== ( strtolower($_SERVER['HTTPS'] ?? $_SERVER['HTTP_X_FORWARDED_SSL'] ?? $_SERVER['X-Forwarded-Ssl'] ?? "off")) ); | ||||||
|             || ( "off" !== ( strtolower($_SERVER['HTTPS'] ?? "off")) ); |  | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     protected function prepareRoute(string $route, array &$arguments) |     protected function prepareRoute(string $route, array &$arguments) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user