downey
(Michael Downey)
2021 年6 月 15 日 22:42
1
Continuing the discussion from Forcing hostname has broken support for Onion Services :
We have a use case where, like an onion+clearnet usage, we need two different hostnames for the same Discourse instance. Before we spend some time testing, just wondered if anyone has a feeling whether or not the approach below would still be valid. (Since it’s been a couple years.)
2 个赞
Falco
(Falco)
2021 年6 月 15 日 22:59
2
I think DISCOURSE_BACKUP_HOSTNAME environment variable may work for this now due t
committed 07:54PM - 19 Mar 20 UTC
- Define the CSP based on the requested domain / scheme (respecting force_https)…
- Update EnforceHostname middleware to allow secondary domains, add specs
- Add URL scheme to anon cache key so that CSP headers are cached correctly
3 个赞
downey
(Michael Downey)
2021 年6 月 15 日 23:14
3
Hey that’s worth a try and obviously much simpler. We’ll take a look and report back.
For our purposes it seems to have gotten the job done. Thanks!
f1r4s
(Eddie)
2022 年1 月 16 日 00:33
4
您好 @downey @Falco ,
您能否与我们分享使用 DISCOURSE_BACKUP_HOSTNAME 和 Tor 设置的指南?
我去年曾尝试过,但现在在使用 onion 容器和 nginx 配置时遇到了一些连接冲突。我的 onion 地址出现空白页。
ERR_EMPTY_RESPONSE
谢谢。
您好。
这还有效吗?
大家好。
我想在我的 discourse 论坛中使用 onion 地址。
我参考了几篇文章并安装了 Tor,它运行良好。
感谢 Bryan、pfaffman、Falco。
现在,当我将 onion 地址输入 Tor 浏览器时,它会重定向到 clearnet 地址,然后就不需要使用 Tor 了。
我知道使用 2 个域名不是一个理想的方式。但是,我需要在我的论坛上使用 onion 地址并希望实现此功能。Sam 介绍了一种使用插件的方法,Falco 介绍了 DISCOURSE_BACKUP_HOSTNAME 环境变量方法。
我尝试使用 Sam 的插件方法,但它不起作用。
我从未测试过 DISCOURSE_BACKUP_HOSTNAME 方法。
请就此问题提供建议。
谢谢。