# Redirect\_uri query parameter is not adding https

**URL:** https://meta.discourse.org/t/redirect-uri-query-parameter-is-not-adding-https/169709
**Category:** Support
**Tags:** openid-connect
**Created:** [November 2, 2020, 7:49am UTC](https://meta.discourse.org/t/redirect-uri-query-parameter-is-not-adding-https/169709 "2020-11-02T07:49:58Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![saidlt](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@saidlt](https://meta.discourse.org/u/saidlt)
#### Post date: [November 2, 2020, 7:49am UTC](https://meta.discourse.org/t/redirect-uri-query-parameter-is-not-adding-https/169709/1 "2020-11-02T07:49:58Z")

</div>

redirect\_uri query parameter is not adding https

 ![image](https://global.discourse-cdn.com/meta/original/3X/a/b/abea8d92a29cd191e8cd6d902c64d1979cba7c2c.png)

Description:

Note: My oidc client is already configured with [https://forums.abc.com](https://forums.abc.com)

Even when we set bnconfig to [https://forums.abc.com](https://forums.abc.com) it is not adding redirect url [https://forums.abc.com/](https://forums.abc.com/) instead it is making [http://https//](http://https//) (Please notice no colon( : ) after https) which is totally wrong. By the way if we are skipping the protocol in bnconfig command it is making http redirect url to http which is not secure.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [November 2, 2020, 10:15am UTC](https://meta.discourse.org/t/redirect-uri-query-parameter-is-not-adding-https/169709/2 "2020-11-02T10:15:54Z")

</div>

> [@saidlt](#):
>
> redirect\_uri query parameter is not adding https

Make sure to enable ‘force https’ site setting in your admin panel.

---

<div class="post-metadata">

### Author: ![saidlt](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@saidlt](https://meta.discourse.org/u/saidlt)
#### Post date: [November 2, 2020, 11:02am UTC](https://meta.discourse.org/t/redirect-uri-query-parameter-is-not-adding-https/169709/3 "2020-11-02T11:02:16Z")

</div>

1. Enabled **force\_https** true in admin panel.
2. Navigated to [https://forum.abc.com](https://forum.abc.com)

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

Now, If you observe above screenshot carefully started with https, it got redirected to http.

After the authentication is completed and gets the final redirection, below is the screenshot.  
 ![image](https://global.discourse-cdn.com/meta/original/3X/a/8/a8d10a6e13b04697a94e76a349be017ba62a0732.png)

FYI..  
If I disable force\_https then the redirection is ending up on http even when started with https.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [November 2, 2020, 11:30am UTC](https://meta.discourse.org/t/redirect-uri-query-parameter-is-not-adding-https/169709/4 "2020-11-02T11:30:03Z")

</div>

Is your discourse site behind a proxy? If so, you will need to set the `x-forwarded-proto` header. This topic has more information on configuring a reverse proxy:

> [@Run other websites on the same machine as Discourse](https://meta.discourse.org/t/running-other-websites-on-the-same-machine-as-discourse/17247):
>
> @pfaffman edited this heavily 2022.02.24. Blame me if it’s broken. If you want to run other websites on the same machine as Discourse, you need to set up an extra NGINX or HAProxy proxy in front of the Docker container. NOTE: This is for advanced admins This guide assumes you already have Discourse working - if you don’t, it may be hard to tell whether or not the configuration is working. You cannot use ./discourse-setup to set up Discourse if another server is using port 80 or 443. You will…

---

<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: [December 2, 2020, 11:34am UTC](https://meta.discourse.org/t/redirect-uri-query-parameter-is-not-adding-https/169709/5 "2020-12-02T11:34:19Z")

</div>

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