Incorrect URL created when qBittorrent is behind a reverse proxy causing 404 error
See original GitHub issueI have my qBittorrent instance on a docker network along with a reverse proxy and the Web UI is available at http://[HOST]/qBittorrent/. The API is available and works correctly, when using curl or my browser. qbittorrent-api seems to ignore the base url and so I’ve been getting 404s when trying to use the API. Here is the example code:
qbt_client = qbittorrentapi.Client(host='http://[HOST]/qBittorrent/', username='[USERNAME]', password='[PASSWORD]')
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
IIS reverse proxy / url rewrite 404 errors *sometimes - Reddit
I have been trying to get reverse proxy working adequately for qBittorrent for a while. My search for a fix to this specific...
Read more >Apache reverse proxy not working and generates a 404 error
When I curl http://localhost:8080/idp/shibboleth in the console, the instance responce is generated correctly. However when I do the same on my ...
Read more >The "subfolder problem", OR, "why can't I reverse proxy my ...
Ultimately, to fix this issue, all links and redirects must match up to valid URLs that Caddy knows how to handle. Something's gotta...
Read more >SWAG setup - LinuxServer.io
Reverse Proxy. A reverse proxy is a type of proxy server that retrieves resources on behalf of a client from one or more...
Read more >Newest 'proxypass' Questions - Stack Overflow
how to configure nginx reverse proxy for angular app built with base href ... of through a different port, if possible, but all...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
hmm…even if they supported a base url, i still think this client would be broken…since it’ll always send the default paths…unless qbittorrent just accepted either i guess.
in theory, it wouldn’t be too hard to prefix the API path with any user provided base path. just a little concerned that could be a breaking change to some users if they are randomly including a path in their instantiations right now…seems pretty unlikely though.
i can at least mock something up in the next few days. thanks for letting me know.
Yes my reverse proxy is trimming the prefixes. qBittorrent currently doesn’t support base urls, so I have to trim it to make it available through the reverse proxy. There is an issue open for it on qBittorrent: https://github.com/qbittorrent/qBittorrent/issues/5693
It has been open for quite some time though, so I don’t know when that feature will be added. It’s possible that this could be considered an upstream issue. Anyways here is the command:
I copied the cookie from my browser after logging in through the Web UI. I didn’t want to include it in case it contained any sensitive information, but the output does work.