Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTPS na AWS #5

Open
goncalomartins opened this issue Apr 30, 2019 · 1 comment
Open

HTTPS na AWS #5

goncalomartins opened this issue Apr 30, 2019 · 1 comment

Comments

@goncalomartins
Copy link
Member

ver dmikusa/cf-php-apache-buildpack#6

em casos que o servidor está atrás de proxies ou de load balancers as server variables não são preenchidas conforme a plataforma espera.. a variavel $_SERVER['HTTPS'] não está "on"... e para determinador servidores o $_SERVER['SERVER_PORT'] está preenchido com "80" o que faz com que a framework fique com url base em http ou que coloque a porta 80 quando não devia....

@goncalomartins
Copy link
Member Author

if(isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'){
$_SERVER['HTTPS']='on';
unset($_SERVER['SERVER_PORT']);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant