boramalper / magnetico

Autonomous (self-hosted) BitTorrent DHT search engine suite.
http://labs.boramalper.org/magnetico/
GNU Affero General Public License v3.0
3.06k stars 344 forks source link

Fixes `/torrents/{{hash}}` page when serving MagneticoW from a sub-path #270

Closed HorlogeSkynet closed 3 years ago

HorlogeSkynet commented 3 years ago

MagneticoW is currently not reverse-proxiable out-of-the-box from a sub-path. Some URIs are relative, others absolute. No environment variable nor configuration setting may allow us to specify a "public URL" or even a "base path" to make the internal Go router generate correct URLs. Although, it's possible to come up with proper NGINX's sub_filter or Apache's proxy_html/substitute modules usages to fix them. This patch back-ports @rnhmjoj's "fix" to avoid crash when extracting hash from URL on /torrents/{{ hash }} page.

See #111.

HorlogeSkynet commented 3 years ago

Up @boramalper 👋

HorlogeSkynet commented 3 years ago

Feel free to cherry-pick the commit if you want.