Expand description
HTTP handlers for ACME HTTP-01 challenge responses.
This module provides an HttpChallengeHandler that can intercept incoming
HTTP requests and respond to ACME HTTP-01 challenge validation attempts.
It checks whether a request path matches the well-known ACME challenge
prefix, looks up the corresponding key authorization (first in a local
in-memory map, then optionally in shared Storage), and returns it.
For non-challenge requests the handler returns None, allowing the caller
to fall through to its normal request handling logic.
Also includes a helper for constructing HTTPS redirect URLs.
Structs§
- Http
Challenge Handler - Handles HTTP-01 ACME challenge requests.
Constants§
- ACME_
CHALLENGE_ PATH_ PREFIX - The well-known URL path prefix for ACME HTTP-01 challenge requests (RFC 8555 Section 8.3).
- ZEROSSL_
VALIDATION_ PATH_ PREFIX - The well-known URL path prefix for ZeroSSL HTTP validation requests.
Functions§
- extract_
challenge_ token - Extract the challenge token from an ACME HTTP-01 challenge path.
- https_
redirect_ url - Build an HTTPS redirect URL from the given host and path.
- is_
challenge_ request - Returns
trueifpathlooks like an ACME HTTP-01 challenge request. - is_
valid_ challenge_ token - Validate that a challenge token contains only valid base64url characters.