Proxy API
The Proxy API creates proxified URLs that route content through StremThru.
Authentication
Authorization is checked against the STREMTHRU_AUTH configuration.
If the token query parameter is present, the proxified link will not be encrypted.
If the X-StremThru-Authorization header is present, the proxified link will be encrypted.
WARNING
Either token query parameter or X-StremThru-Authorization header must be present for proxifying urls.
Endpoints
GET /v0/proxy
Proxify one or more URLs via query parameters.
Query Parameters:
| Parameter | Description |
|---|---|
url | URL to proxify (can be specified multiple times) |
exp | Expiration time duration (optional) |
req_headers[i] | Headers for the URL at position i (optional) |
req_headers | Fallback headers if req_headers[i] is missing (optional) |
filename[i] | Filename for the URL at position i (optional) |
token | Token for authorization (optional) |
redirect | Redirect to proxified URL, valid for single url (optional) |
POST /v0/proxy
Proxify one or more URLs via form body.
Request: x-www-form-urlencoded body with the same fields as the GET endpoint (except redirect).
Response:
json
{
"items": ["string"],
"total_items": "int"
}