Mixed content
-
Hi guys, was getting a mixed content bug due to line 319 of includes>class-pys.php
The issue was only causing problems on iOS Chrome and Safari on a page that was loading our Voiceflow Widget: https://www.seahavennoosa.com.au/assistant/
Here is the fix – changed this:
$protocol = isset($_SERVER[‘HTTPS’]) && $_SERVER[‘HTTPS’] === ‘on’ ? ‘https://’ : ‘http://’;
$currentUrl = $protocol . ($_SERVER[‘HTTP_HOST’] ?? parse_url(get_site_url(), PHP_URL_HOST)) . ($_SERVER[‘REQUEST_URI’] ?? ”);To this:
$isSecure = ( isset( $_SERVER[‘HTTPS’] ) && strtolower( $_SERVER[‘HTTPS’] ) === ‘on’ )
|| ( isset( $_SERVER[‘HTTP_X_FORWARDED_PROTO’] ) && strtolower( $_SERVER[‘HTTP_X_FORWARDED_PROTO’] ) === ‘https’ )
|| is_ssl();
$protocol = $isSecure ? ‘https://’ : ‘http://’;
$currentUrl = $protocol . ( $_SERVER[‘HTTP_HOST’] ?? parse_url( get_site_url(), PHP_URL_HOST ) ) . ( $_SERVER[‘REQUEST_URI’] ?? ” );The page I need help with: [log in to see the link]
You must be logged in to reply to this topic.