# No \`force\_https\` setting?

**URL:** https://meta.discourse.org/t/no-force-https-setting/294228
**Category:** Support
**Created:** [February 5, 2024, 7:39pm UTC](https://meta.discourse.org/t/no-force-https-setting/294228 "2024-02-05T19:39:17Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![balupton](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/balupton/32/255461_2.png) [@balupton](https://meta.discourse.org/u/balupton)
#### Post date: [February 5, 2024, 7:39pm UTC](https://meta.discourse.org/t/no-force-https-setting/294228/1 "2024-02-05T19:39:17Z")

</div>

Has the `force_https` setting been removed? Or is does it not show up if certain templates are used. Here are the templates I’m using:

```plaintext
templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/cloudflare.template.yml"
  - "templates/web.ssl.template.yml" # https
  - "templates/web.letsencrypt.ssl.template.yml" # https
  # - "templates/web.ratelimited.template.yml" # not needed 

```

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [February 5, 2024, 8:24pm UTC](https://meta.discourse.org/t/no-force-https-setting/294228/2 "2024-02-05T20:24:57Z")

</div>

I don’t think so. I see no changes around `force_https` and I can still see the setting 🤔

 ![image](https://global.discourse-cdn.com/meta/original/4X/1/0/0/100a87dc7db04582b7a857fb8294f210fdb8c3be.png)  
`

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [February 5, 2024, 8:39pm UTC](https://meta.discourse.org/t/no-force-https-setting/294228/3 "2024-02-05T20:39:20Z")

</div>

I think there is some magic that hides it if you meet certain criteria:

 ![image](https://global.discourse-cdn.com/meta/original/4X/f/8/c/f8cc54b4c31c8e4ff8b463f2564df07b3bf89c35.png)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [February 5, 2024, 8:57pm UTC](https://meta.discourse.org/t/no-force-https-setting/294228/4 "2024-02-05T20:57:30Z")

</div>

Without finding the code, I think what happens is that if you have a certificate, `DISCOURSE_FORCE_HTTPS` gets set to true, so it’s hidden from the UX.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [February 5, 2024, 9:16pm UTC](https://meta.discourse.org/t/no-force-https-setting/294228/5 "2024-02-05T21:16:02Z")

</div>

I was looking for this the other day. Is it this bit:

> <https://github.com/discourse/discourse_docker/blob/1964d1737a36b4f46ed3c0bc8b25db24e1a9a0c2/templates/web.letsencrypt.ssl.template.yml#L104>

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [February 5, 2024, 9:18pm UTC](https://meta.discourse.org/t/no-force-https-setting/294228/6 "2024-02-05T21:18:18Z")

</div>

That’s it! The other way to get stuff into `config/discourse.conf` is setting an ENV variable, which results in something writing those out to that file just like that.

---

<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: [March 6, 2024, 9:18pm UTC](https://meta.discourse.org/t/no-force-https-setting/294228/7 "2024-03-06T21:18:22Z")

</div>

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