peyrusse is experiencing an error while trying to install a theme from GitHub on their intranet environment. The error message reads: FinalDestination: lookup failed.
david suggests that this error is thrown when Discourse tries to connect to a private/internal IP address. He thinks it’s possible that the intranet is pointing GitHub’s DNS record to an internal IP address.
To resolve the issue, david proposes two solutions:
Add github.com to the ‘allowed internal hosts’ site setting, but notes that this may affect Discourse’s security.
Manually download the theme from GitHub and upload it to Discourse, but this would mean no automated updates.
peyrusse tried adding github.com to ‘allowed internal hosts’ but it didn’t work. david then suggests that the issue might be due to the Discourse instance being unable to make a DNS lookup, and asks if the intranet allows access to the internet.
When i try to install it, i got this error message :
Failed to process hijacked response correctly : FinalDestination::SSRFDetector::LookupFailedError : FinalDestination: lookup failed
This error is thrown when something attempts to connect to a private/internal IP address. If you’re getting it when cloning a theme from GitHub, then that suggests your intranet is pointing GitHub’s DNS record to some internal IP address… which is quite unusual! Is that expected in your intranet environment?
There is a site setting ‘allowed internal hosts’ which can be used to add hostnames which will bypass Discourse’s SSRF protections. Adding github.com there may help, but will also affect the security of Discourse.
Another option would be to download the theme from GitHub manually and then upload it to Discourse. But of course, that would mean you won’t get any automated updates.