[wp-trac] [WordPress Trac] #34298: Amazon LB SSL / HTTP_X_FORWARDED_PROTO
WordPress Trac
noreply at wordpress.org
Wed Oct 14 12:47:20 UTC 2015
#34298: Amazon LB SSL / HTTP_X_FORWARDED_PROTO
--------------------------+-----------------------------
Reporter: OskHa | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: HTTP API | Version: 4.3.1
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
extend is_ssl() method. Otherwise its not working with SSL over
loadbalancer.
{{{
function is_ssl() {
if ( isset($_SERVER['HTTPS']) ) {
if ( 'on' == strtolower($_SERVER['HTTPS']) )
return true;
if ( '1' == $_SERVER['HTTPS'] )
return true;
} elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' ==
$_SERVER['SERVER_PORT'] ) ) {
return true;
}
if ( isset($_SERVER['HTTP_X_FORWARDED_PROTO']) &&
strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https' ) {
return true;
}
return false;
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34298>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list