Last active
September 2, 2019 02:47
#concrete5 #5.7 How to work concrete5 behind a load balancer or a reverse proxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Always trust incoming request. | |
* | |
* application/config/concrete.php | |
* | |
* For more detail, see: http://symfony.com/doc/current/cookbook/request/load_balancer_reverse_proxy.html | |
*/ | |
// Get remote address | |
$remoteIp = $_SERVER['REMOTE_ADDR']; | |
return [ | |
'security' => [ | |
'trusted_proxies' => [ | |
'ips' => [$remoteIp] | |
], | |
], | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, this gist can be dangerous. Please read the Symfony doc in the comment.