[wp-trac] [WordPress Trac] #34298: Amazon LB SSL / HTTP_X_FORWARDED_PROTO
WordPress Trac
noreply at wordpress.org
Wed Oct 14 15:09:39 UTC 2015
#34298: Amazon LB SSL / HTTP_X_FORWARDED_PROTO
--------------------------+------------------------
Reporter: OskHa | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: General | Version:
Severity: normal | Resolution: duplicate
Keywords: | Focuses:
--------------------------+------------------------
Comment (by OskHa):
yes, but its "dirty".
If someone likes it, here is the complete solution.
{{{
function additionalHttpsCheck () {
if ( isset($_SERVER['HTTP_X_FORWARDED_PROTO']) &&
strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https' ) {
$_SERVER['HTTPS'] = "on";
$_SERVER['SERVER_PORT'] = '443';
}
is_ssl();
}
add_action ( 'init', 'additionalHttpsCheck', 1 );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34298#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list