Proxy

Proxy upstream provider requests

Changed on

Forwards 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)
get/v1/proxy

Request

  • Base URL
    https://api.example.com
  • URL
    https://api.example.com/v1/proxy
  • Auth
    none declared

Query parameters

datastring required

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 query request parameter data

    • info

      api operation id proxyRequest was 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

      removed the success response with the status

    • warning

      deleted the query request parameter data

    • info

      api operation id proxyRequest removed 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