Proxy upstream provider requests
Changed onForwards requests to upstream streaming providers while handling headers and authentication.
Data Parameter Format: The data parameter must be a encodeURIComponent() encoded JSON object:
{
"url": "https://upstream-provider.com/stream.m3u8",
"headers": {
"Referer": "https://provider.com",
"User-Agent": "Mozilla/5.0",
"more": "headers..."
}
}
The frontend does not have to care about these data objects, since the url fields from the backend response should automatically do that already.
Content-Type Handling: You will get that content type back, which you would, if you were requesting the url directly.
Caching:
- Subtitles: Cache subtitles up to 24 hours
- DO NOT cache proxy responses (pass through caching headers from upstream)
Request
- Base URLhttps://api.example.com
- URLhttps://api.example.com/v1/proxy
- Authnone declared
Query parameters
encodeURIComponent() encoded JSON object containing url and optional headers. Example (decoded): {"url":"https://example.com/stream.m3u8","headers":{"Referer":"https://provider.com"}}
Response
Upstream response proxied successfully
Changes
- breaking
added the new required
queryrequest parameterdata - info
api operation id
proxyRequestwas added - info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the success response with the status
- breaking
- breaking
removed the success response with the status
- warning
deleted the
queryrequest parameterdata - info
api operation id
proxyRequestremoved and replaced with - info
removed the non-success response with the status
- info
removed the non-success response with the status
- info
removed the non-success response with the status
- breaking