Skip to main content

Module proxy

Module proxy 

Source
Expand description

The host’s fetch proxy: how a page reads cross-origin responses that the site does not allow it to (CORS). The workspace host the page is admitted to offers one: [host] is its implementation, which tilo-server serves and, in development, tilo-fetch-proxy.

Structs§

Proxy

Enums§

ProxyFailure
ProxyUse

Constants§

ERROR_HEADER
FINAL_URL_HEADER
FORWARD_PREFIX
Prefix of headers the proxy restores to their real name, both ways.
MARKER_HEADER
MARKER_PARAM
SESSION_HEADER
SESSION_PARAM
VERSION

Functions§

configure
Enable the host’s proxy at endpoint, or disable it with None. Hosts call this, not apps: every proxied request carries the app’s headers and body to the endpoint, so it must be the page’s own host or the workspace host the page is admitted to.
current
The proxy in use: the host’s configure choice, else what the page names in globalThis.__tiloFetchProxy, else none.
endpoint
media_url
The URL a page element that cannot send headers (a media element) loads target from through proxy.
route
unwrap_response