Overview

The Web Proxy API fetches external http or https URLs and rewrites links so they can be embedded inside Allternit surfaces. It blocks private and loopback addresses and injects a small script that intercepts navigation and posts messages to the parent frame.

Base URL

This endpoint is public; no authentication is required. It is intended for server-side proxying on behalf of authenticated clients.

Endpoints

Proxy request

Query parameters: For non-HTML responses, the proxy returns the upstream bytes with the original Content-Type and Access-Control-Allow-Origin: *. For HTML responses, the proxy:
  • Sets <base href="{origin}/">.
  • Rewrites iframe, frame, form, and a tag URLs to point back through the proxy.
  • Injects a script that intercepts clicks and history.pushState/replaceState calls, posting allternit-navigate messages to the parent window.

Error responses

Error responses are returned as JSON:

Error codes