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 mentioned in the title my web server is behind a Rackspace load balancer with SSL termination, it means that the data between the load balancer and the local servers travels unencrypted (but we're still on a secure connection!).
For some reason your isSsl() is not working as expected, it returns false. Therefore the plugin doesn't work. I wrote a little temporary hack that let me use your plugin though. It consists on returning the is_ssl() value directly:
/**
* Checks if the current page is SSL
*
* @param none
* @return bool
*/
public function isSsl() {
if (is_ssl()) {
return true;
}
// Some extra checks for Shared SSL
if ( is_ssl() && strpos($_SERVER['HTTP_HOST'], $this->getHttpsUrl()->getHost()) === false && $_SERVER['SERVER_ADDR'] != $_SERVER['HTTP_HOST'] ) {
return false;
} else if ( isset($_SERVER['HTTP_CF_VISITOR']) && strpos($_SERVER['HTTP_CF_VISITOR'], 'https') ) {
return true;
} else if ( isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https' ) {
return true;
} else if ( $this->getSetting('ssl_host_diff') && !is_ssl() && isset($_SERVER['HTTP_X_FORWARDED_SERVER']) && $this->getHttpsUrl()->getHost() == $_SERVER['HTTP_X_FORWARDED_SERVER'] ) {
return true;
} else if ( $this->getSetting('ssl_host_diff') && !is_ssl() && $this->getHttpsUrl()->getHost() == $_SERVER['HTTP_HOST'] && ( $this->getHttpsUrl()->getPort() <= 0 || $_SERVER['SERVER_PORT'] == $this->getHttpsUrl()->getPort() ) && strpos($_SERVER['REQUEST_URI'], $this->getHttpsUrl()->getPath()) !== false ) {
return true;
}
return is_ssl();
}
Basically the native wordpress is_ssl() function works fine for me and it detects if the current session is really SSL or not. Please tell me if you may need further information.
The text was updated successfully, but these errors were encountered:
Hi,
As mentioned in the title my web server is behind a Rackspace load balancer with SSL termination, it means that the data between the load balancer and the local servers travels unencrypted (but we're still on a secure connection!).
For some reason your isSsl() is not working as expected, it returns false. Therefore the plugin doesn't work. I wrote a little temporary hack that let me use your plugin though. It consists on returning the is_ssl() value directly:
Basically the native wordpress is_ssl() function works fine for me and it detects if the current session is really SSL or not. Please tell me if you may need further information.
The text was updated successfully, but these errors were encountered: