Added reverse proxy support
This commit is contained in:
parent
7a1ed50247
commit
5ced8b46f0
|
@ -25,4 +25,8 @@ HASHING_METHOD="sha256"
|
|||
|
||||
## This secret value is used to encrypt secret values (eg. ssh-keys, http-auth passwords, etc)
|
||||
## You should consider your already stored secret values lost when changing this value.
|
||||
COOKIE_LIFETIME=2592000
|
||||
COOKIE_LIFETIME=2592000
|
||||
|
||||
## TRUSTED_PROXIES is a useful variable when using Docker and/or a reverse proxy.
|
||||
## Set it to the IP address of your proxy. YOu can set to multiple proxies by comma-separating them
|
||||
TRUSTED_PROXIES=127.0.0.1
|
|
@ -94,6 +94,7 @@ class Kernel
|
|||
|
||||
private function parseRequest(): Request
|
||||
{
|
||||
Request::setTrustedProxies(explode(',', $_ENV['TRUSTED_PROXIES']), Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO);
|
||||
$request = Request::createFromGlobals();
|
||||
return $request;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue