External nginx proxy and https false error

hi

I am using an external nginx proxy in front of the discourse basic docker installation, everything else worked great except that mobile app users cannot log in and the api keys are not displayed in the admin control panel. In addition, the rails console gives the command
request = ActionDispatch::Request.new({})
request.ssl? the result is false so apparently the docker internal nginx thinks that http is used instead of https, I have configured app.y like this, is this the correct configuration nginx runs on the same machine as discourse not in docker.

Do you see any obvious errors or shortcomings in the app.yml configuration? External nginx handles certificates and SSL termination.

  • “templates/web.template.yml”

  • “templates/web.ratelimited.template.yml”

  • “templates/web.ssl.template.yml”

#- “templates/web.letsencrypt.ssl.template.yml”

  • “templates/web.socketed.template.yml”
  • #expose:
  • #- “80:80” # http
  • #- “443:443” # https

env:

DISCOURSE_FORCE_HTTPS: true

DISCOURSE_TRUSTED_PROXIES: 127.0.0.1,172.17.0.1

The solution to the problem was simpler than I thought, it was pure user error, so the server is fine.

Would you like to tell what was the solution?

The user had accidentally downloaded the Discord mobile software and tried to log in to Discourse with it. I guided him to download the correct software, Discourse Hub, and he was able to log in to the forum. No adjustments were needed on the server side.

2 לייקים