Expand description
The control API: the only path that will ever be allowed to write.
No CORS headers are emitted anywhere in this module, and OPTIONS is refused. That
combination is the security boundary, so it is worth spelling out.
A page served under an alias origin is untrusted code. If it tries to reach the control API it has to send the token header; a custom header is not CORS-safelisted, so sending it forces a preflight; and a refused preflight means the request is never made. Without the header the request is a 401 instead. An extension is outside CORS by virtue of its host permissions, so none of this impedes it.
The listener also only routes here for requests whose Host is the loopback address,
which guard::classify already separates from alias requests. A proxied request
cannot arrive here at all.
Structs§
- Token
- A bearer token for the control API.
Enums§
- Source
- Where the token this run is using came from.
Constants§
- FETCH_
SITE_ HEADER - What a browser says about who started a request.
- PATH_
PREFIX - PROTOCOL_
MAX - PROTOCOL_
MIN - Protocol versions this daemon can speak.
- TOKEN_
HEADER - The header the token must arrive in.