You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As because not having control to set up ssl certificate, client has used https://www.cloudflare.com/ssl for ssl cerificate. My local xamp installation working fine with Request::secure(). while debugging I found locally i have set $_SERVER['HTTPS'] = on while there is no such key set on server though its https instead $_SERVER['HTTP_X_FORWARDED_PROTO'] = https. I have gone in to Illuminate\Http\Request library and landed in Symfony\Component\HttpFoundation\Request where I came to know isSecure() method by default using $_SERVER['HTTP_X_FORWARDED_PROTO'] = https. The whole game is setting up setTrustedProxies() and setTrustedHeaderName() . I have tried Request::setTrustedHeaderName('client_proto', 'X_FORWARDED_PROTO'); though its returning false. Can you bit explore here what can be done to get Request::secure() return true if $_SERVER['HTTP_X_FORWARDED_PROTO'] = https is set. I found some solutions over here dmikusa/cf-php-apache-buildpack#6 but want to know if other way available with laravel. Thanks!
The text was updated successfully, but these errors were encountered:
As because not having control to set up ssl certificate, client has used https://www.cloudflare.com/ssl for ssl cerificate. My local xamp installation working fine with
Request::secure()
. while debugging I found locally i have set$_SERVER['HTTPS'] = on
while there is no such key set on server though its https instead$_SERVER['HTTP_X_FORWARDED_PROTO'] = https
. I have gone in toIlluminate\Http\Request
library and landed inSymfony\Component\HttpFoundation\Request
where I came to knowisSecure()
method by default using$_SERVER['HTTP_X_FORWARDED_PROTO'] = https
. The whole game is setting upsetTrustedProxies()
andsetTrustedHeaderName()
. I have triedRequest::setTrustedHeaderName('client_proto', 'X_FORWARDED_PROTO');
though its returning false. Can you bit explore here what can be done to getRequest::secure()
return true if$_SERVER['HTTP_X_FORWARDED_PROTO'] = https
is set. I found some solutions over heredmikusa/cf-php-apache-buildpack#6 but want to know if other way available with laravel. Thanks!
The text was updated successfully, but these errors were encountered: