Repository navigation
Conversation
Routes /{id}/api and /{id}/download (also behind a base URL) through the normal access checks, so apps like Listenarr can use Prowlarr indexers with a scoped key. Prowlarr writes its own URL and API key into the download links of feed results; those are rewritten to the proxy URL and the caller's key.
Member
|
Let me get that signalr one landed on develop and then we can loop back to this one as well |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Prowlarr exposes every indexer as a Newznab/Torznab feed at
/{id}/apiand serves grabs at/{id}/download. Apps that search indexers directly through those feeds (Listenarr, for example) cannot go through starrproxy: nginx only routes.../api/..., so/{id}/apifalls into the JSON 404 block.Prowlarr also writes its own URL and API key into the download links of every feed result (
http://prowlarr:9696/{id}/download?apikey=<prowlarr key>&link=...). Any consumer of the feed therefore receives Prowlarr's full API key, and downloads go straight to Prowlarr instead of through the proxy.Fix
/{id}/apiand/{id}/download(also behind a base URL, the prefix is stripped like on the other routes) that passesendpoint=/{id}/apitoapi/index.php. The existing/api/route is unchanged./{id}/api,/{id}/download), so they go through the normal access check, logging, usage and blocked notifications. An app needs them granted like any other endpoint.Content-Lengthis dropped for the rewritten body.3 files:
root/etc/nginx/template.conf,api/index.php,functions/api.php.Note: #111 (SignalR passthrough) also touches
template.conf. This adds a separate location block, so the two should merge either way.Testing
Built from this branch, real Prowlarr 2.6.5, proxied app granted
/api/v1/indexer,/{id}/api,/{id}/download./1/api?t=capswith the app's keyapplication/rss+xml, Prowlarr caps/foo/1/api?t=caps(base URL)application/rss+xml/1/api?t=search&q=...&limit=1<link>points athttp://<proxy>/1/download?apikey=<proxy key>/api/v1/indexerand/foo/api/v1/indexer/api/v1/system/status(not granted)/1/apiwith a key without the indexer grant/1/apiwithout a key/foo/api{"error":"Starr Proxy: Invalid starr route"}