mirror of
https://github.com/Mibew/mibew.git
synced 2025-01-30 21:10:29 +03:00
parent
e718518698
commit
8b1e218862
@ -77,6 +77,15 @@ default_locale: en
|
||||
# http://php.net/manual/en/timezones.php
|
||||
timezone: ""
|
||||
|
||||
# List of proxy's IP Mibew should trust. You should set this option if you use
|
||||
# Mibew with a load balancer or behind a proxy.
|
||||
trusted_proxies: []
|
||||
# Here is an example of what values this option can take:
|
||||
# trusted_proxies:
|
||||
# - 127.0.0.1
|
||||
# - ::1
|
||||
# - 10.0.0.0/8
|
||||
|
||||
# Plugins
|
||||
plugins: []
|
||||
|
||||
|
@ -44,6 +44,10 @@ require_once(MIBEW_FS_ROOT . '/libs/common/request.php');
|
||||
require_once(MIBEW_FS_ROOT . '/libs/common/response.php');
|
||||
require_once(MIBEW_FS_ROOT . '/libs/common/string.php');
|
||||
|
||||
if (count($configs['trusted_proxies']) > 0) {
|
||||
\Symfony\Component\HttpFoundation\Request::setTrustedProxies($configs['trusted_proxies']);
|
||||
}
|
||||
|
||||
// We need to get some info from the request. Use symfony wrapper because it's
|
||||
// the simplest way.
|
||||
$tmp_request = \Symfony\Component\HttpFoundation\Request::createFromGlobals();
|
||||
|
Loading…
Reference in New Issue
Block a user