php-pm / php-pm-httpkernel

HttpKernel adapter for use of Symfony and Laravel frameworks with PHP-PM
MIT License
246 stars 72 forks source link

Simplify TRUSTED_PROXIES and TRUSTED_HOSTS config #115

Closed acasademont closed 6 years ago

acasademont commented 6 years ago

I believe using getenv provides a simpler way to extract the variable, avoiding the isset ternary. getenv is case insensitive

andig commented 6 years ago

I don't know- where are those env variables set?

acasademont commented 6 years ago

getenv() and $_SERVER behave the same way, the only difference is that getenv() is case-insensitive. In the Symfony Bootstrap we already used getenv() previously hence the PR to keep it coherent.

acasademont commented 6 years ago

To be clear, this is not a bug fix, is just a simpler version of the same lines using getenv()