FreiChat related discussions
Problems after adding SSL

Hello,

I recently changed my website to redirect to HTTPS. However, I installed freichat before making this change. Freichat is no longer loading for my site.

It looks like Freichat is not redirecting its make_url function to https. In my debug console in chrome, it is giving me the following error:

Mixed Content: The page at 'https://MY_URL.com/' was loaded over HTTPS, but requested an insecure script 'http://MY_URL.com/freichat/client/main.php?id=1&xhash=1fc434112254ac547c90dcda58cc3717'. This request has been blocked; the content must be served over HTTPS.

(index):70 Mixed Content: The page at 'https://MY_URL.com/' was loaded over HTTPS, but requested an insecure stylesheet 'http://MY_URL.com/freichat/client/jquery/freichat_themes/freichatcss.php'. This request has been blocked; the content must be served over HTTPS.

I have attempted to hardcode an https redirect in ./freichat/arg.php by modifying the following lines of code under public static function build_paths() to be https regardless of the original server redirect.

if (@$_SERVER["HTTPS"] == "on") {
    $protocol = "https://";
} else {
    $protocol = https://";
}
return $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'];

However, this does not resolve the problem.

Does anyone know how to retroactively force Freichat to serve https?

Thank you

Hello, I recently changed my website to redirect to HTTPS. However, I installed freichat before making this change. Freichat is no longer loading for my site. It looks like Freichat is not redirecting its make_url function to https. In my debug console in chrome, it is giving me the following error: ```` Mixed Content: The page at 'https://MY_URL.com/' was loaded over HTTPS, but requested an insecure script 'http://MY_URL.com/freichat/client/main.php?id=1&xhash=1fc434112254ac547c90dcda58cc3717'. This request has been blocked; the content must be served over HTTPS. (index):70 Mixed Content: The page at 'https://MY_URL.com/' was loaded over HTTPS, but requested an insecure stylesheet 'http://MY_URL.com/freichat/client/jquery/freichat_themes/freichatcss.php'. This request has been blocked; the content must be served over HTTPS. ```` I have attempted to hardcode an https redirect in ./freichat/arg.php by modifying the following lines of code under public static function build_paths() to be https regardless of the original server redirect. ```` if (@$_SERVER["HTTPS"] == "on") { $protocol = "https://"; } else { $protocol = https://"; } return $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']; ```` However, this does not resolve the problem. Does anyone know how to retroactively force Freichat to serve https? Thank you

Do not edit the freichat code.

You need to edit the urls in the copy/paste code that you got at the end of freichat installation

Do not edit the freichat code. You need to edit the urls in the copy/paste code that you got at the end of freichat installation

Hello,

Thank you for the response. Following your advice, I modified the head.php file to be https rather than http.

For those of you finding this through a google search, you can find head.php using the following bash command

find . list | grep -i head.php

After opening head.php, you will find a piece of code near the bottom that looks like this

<script type ="text/javascript" language="javascript" src="http...."
    <link rel="stylesheet" href="http....

Change those to https and you should be good to go.

Note, you will also need to go into /YOUR_URL/freichat/server/ and make the following changes in freichat.php

Find all instances of http://www.gravatar.com and replace them with https://

This will remove some console errors.

Thank you for pointing me in the right direction adesh1414127033.

Hello, Thank you for the response. Following your advice, I modified the head.php file to be https rather than http. For those of you finding this through a google search, you can find head.php using the following bash command ```` find . list | grep -i head.php ```` After opening head.php, you will find a piece of code near the bottom that looks like this ```` &lt;script type =&quot;text/javascript&quot; language=&quot;javascript&quot; src=&quot;http....&quot; &lt;link rel=&quot;stylesheet&quot; href=&quot;http.... ```` Change those to https and you should be good to go. Note, you will also need to go into /YOUR_URL/freichat/server/ and make the following changes in freichat.php Find all instances of http://www.gravatar.com and replace them with https:// This will remove some console errors. Thank you for pointing me in the right direction adesh1414127033.
488
2
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft