# Discourse not aware of SSL termination (mixed content)

**URL:** https://meta.discourse.org/t/discourse-not-aware-of-ssl-termination-mixed-content/121650
**Category:** Self-hosting
**Created:** [6월 29, 2019, 1:45오후 UTC](https://meta.discourse.org/t/discourse-not-aware-of-ssl-termination-mixed-content/121650 "2019-06-29T13:45:08Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Shachar](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@Shachar](https://meta.discourse.org/u/Shachar)
#### Post date: [6월 29, 2019, 1:45오후 UTC](https://meta.discourse.org/t/discourse-not-aware-of-ssl-termination-mixed-content/121650/1 "2019-06-29T13:45:08Z")

</div>

Site is at [https://forum.practical-pl.org](https://forum.practical-pl.org).

If you go there now, you will get a “mixed content” warning from your browser. That’s because the docker is listening on a Unix domain socket, and an NGINX front end is redirecting traffic to it. This redirection also includes the SSL termination (i.e. - the certificates are installed at the reverse proxy, not the discourse client itself).

As a result, any absolute URL that discourse generates is an HTTP URL rather than HTTPS. Most notably, this includes the site’s icons and the activation links sent to new users.

How do I tell discourse to generate https links?

Thank you,  
Shachar

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [6월 29, 2019, 1:59오후 UTC](https://meta.discourse.org/t/discourse-not-aware-of-ssl-termination-mixed-content/121650/2 "2019-06-29T13:59:53Z")

</div>

The force\_https setting will fix this, it’s mandatory in any scenario where HTTPS is being used.

---

<div class="post-metadata">

### Author: ![Shachar](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@Shachar](https://meta.discourse.org/u/Shachar)
#### Post date: [6월 29, 2019, 2:10오후 UTC](https://meta.discourse.org/t/discourse-not-aware-of-ssl-termination-mixed-content/121650/3 "2019-06-29T14:10:06Z")

</div>

Except, as far as I can tell, it is on, and the problem persists.

Do I need to regenerate the docker after setting it?

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [6월 29, 2019, 2:49오후 UTC](https://meta.discourse.org/t/discourse-not-aware-of-ssl-termination-mixed-content/121650/4 "2019-06-29T14:49:52Z")

</div>

> [@Shachar](#):
>
> as far as I can tell, it is on

Can you elaborate on this?

---

<div class="post-metadata">

### Author: ![Shachar](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@Shachar](https://meta.discourse.org/u/Shachar)
#### Post date: [6월 29, 2019, 2:55오후 UTC](https://meta.discourse.org/t/discourse-not-aware-of-ssl-termination-mixed-content/121650/5 "2019-06-29T14:55:06Z")

</div>

I found it after finishing installation (technically, the installation directed me to turn it on). Turned it on.

The test email I send does, indeed, now have an HTTPS address, but merely navigating to the site still show the site icons as HTTP, and thus the mixed contents warning still shows.

Now, this might be because I did not update the icons, but I don’t have icons to put there just yet. Even so, I don’t understand why it should be like that.

Also, I tried turning it off and on again (ha!), but that didn’t solve the problem either.

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [6월 29, 2019, 3:05오후 UTC](https://meta.discourse.org/t/discourse-not-aware-of-ssl-termination-mixed-content/121650/6 "2019-06-29T15:05:44Z")

</div>

Try re-uploading an icon/logo which currently reports as insecure.

---

<div class="post-metadata">

### Author: ![Shachar](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@Shachar](https://meta.discourse.org/u/Shachar)
#### Post date: [6월 29, 2019, 8:02오후 UTC](https://meta.discourse.org/t/discourse-not-aware-of-ssl-termination-mixed-content/121650/7 "2019-06-29T20:02:56Z")

</div>

Yes, I just uploaded the same icon it uses right now (the default Discourse icon), and the problem is now resolved.

Thank you, though if I might make a suggestion, the page on how to install really should be updated. It should mention force\_https, as well as that it might be necessary to re-upload the images.

---

<div class="post-metadata">

### Author: ![btsimonh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/btsimonh/32/152331_2.png) [@btsimonh](https://meta.discourse.org/u/btsimonh)
#### Post date: [8월 8, 2019, 7:22오전 UTC](https://meta.discourse.org/t/discourse-not-aware-of-ssl-termination-mixed-content/121650/8 "2019-08-08T07:22:43Z")

</div>

I was working through the same issue with discourse fronted by haproxy doing ssl termination.  
I checked Force Https, and still had the mixed content warnings (e.g. on favicon).  
But when I uploaded a logo, all the warnings went away - including for favicon which I had not changed.  
So maybe it re-calculates the URLs for every image when you upload any image (at least for the based system images…)?

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2월 15, 2023, 10:53오전 UTC](https://meta.discourse.org/t/discourse-not-aware-of-ssl-termination-mixed-content/121650/9 "2023-02-15T10:53:13Z")

</div>



---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [3월 17, 2023, 10:53오전 UTC](https://meta.discourse.org/t/discourse-not-aware-of-ssl-termination-mixed-content/121650/10 "2023-03-17T10:53:20Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
