Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
//for elasticbeanstalk in .ebextensions/.config
option_settings:
- option_name: HTTPS
value: 1
//or in .htaccess
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
//or in cakephp 3 bootstrap.php
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
$_SERVER['HTTPS'] = 'on';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment