Skip to main content

Module security

Module security 

Source
Expand description

HTTPS enforcement, origin comparison and header redaction.

Functionsยง

is_localhost
Whether the URL names this machine.
is_same_origin
Whether two URLs share a scheme, host and port, with default ports treated as equal to their explicit form.
redact_headers
A copy of the headers with credentials replaced, for logging.
require_secure_endpoint
Refuses an endpoint that would carry credentials over plain HTTP, unless it is on this machine.