avoid warning when HTTP_X_FORWARDED_PROTO isn't set
This commit is contained in:
		
							parent
							
								
									e0f1165b6c
								
							
						
					
					
						commit
						3061a9d7d5
					
				| @ -66,7 +66,7 @@ function contact_link(): ?string | ||||
| function is_https_enabled(): bool | ||||
| { | ||||
|     // check forwarded protocol
 | ||||
|     if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') { | ||||
|     if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') { | ||||
|         $_SERVER['HTTPS']='on'; | ||||
|     } | ||||
|     return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off'); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user