Expand description
CSRF and DNS rebinding origin validation.
Functions§
- build_
loopback_ origins - Build the set of allowed origins for a loopback bind address.
- extract_
authority_ from_ origin - Extract the authority (host:port) from an origin URL string.
- is_
loopback_ addr - Returns
trueif the socket address is bound to a loopback interface (IPv4127.0.0.0/8or IPv6::1). Used to determine whether automatic localhost-only origin validation should be applied whenallowed_originsis empty. - make_
origin_ rejection_ response - Build a 403 Forbidden response with a JSON-RPC error body for origin rejection.
- validate_
origin - Validate the Origin header for CSRF and DNS rebinding protection.