Overview
The Web Proxy API fetches externalhttp 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
Endpoints
Proxy request
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, andatag URLs to point back through the proxy. - Injects a script that intercepts clicks and
history.pushState/replaceStatecalls, postingallternit-navigatemessages to the parent window.