From ddd0bb69e1d9ea98a0ea30717e9f25bcd50b41a3 Mon Sep 17 00:00:00 2001 From: MIYAGI Hikaru Date: Fri, 29 Jun 2018 22:36:02 +0900 Subject: Merge `HIDDEN_SERVICE_VIA_TRANSPARENT_PROXY` into `ALLOW_ACCESS_TO_HIDDEN_SERVICE` (#7901) If Mastodon accesses to the hidden service via transparent proxy, it's needed to avoid checking whether it's a private address, since `.onion` is resolved to a private address. I was previously using the `HIDDEN_SERVICE_VIA_TRANSPARENT_PROXY` to provide that function. However, I realized that using `HIDDEN_SERVICE_VIA_TRANSPARENT_PROXY` is redundant, since this specification is always used with `ALLOW_ACCESS_TO_HIDDEN_SERVICE`. Therefore, I decided to integrate the setting of `HIDDEN_SERVICE_VIA_TRANSPARENT_PROXY` into` ALLOW_ACCESS_TO_HIDDEN_SERVICE`. --- app/lib/request.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/lib/request.rb b/app/lib/request.rb index 397614fac..576ed23ca 100644 --- a/app/lib/request.rb +++ b/app/lib/request.rb @@ -154,7 +154,7 @@ class Request alias new open def thru_hidden_service?(host) - Rails.configuration.x.hidden_service_via_transparent_proxy && /\.(onion|i2p)$/.match(host) + Rails.configuration.x.access_to_hidden_service && /\.(onion|i2p)$/.match(host) end end end -- cgit