您好
我正在 Discourse 基础 Docker 安装前面使用外部 nginx 代理,除移动应用用户无法登录以及管理控制面板中不显示 API 密钥外,其他一切运行良好。此外,rails 控制台给出命令
request = ActionDispatch::Request.new({})
request.ssl? 的结果是 false,所以显然 Docker 内部的 nginx 认为使用的是 http 而不是 https。我已按如下方式配置 app.yml,这是正确的配置吗?nginx 与 Discourse 运行在同一台机器上,不在 Docker 内部。
您在 app.yml 配置中看到任何明显的错误或不足之处吗?外部 nginx 负责证书和 SSL 终止。
-
“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