Skip to main content

Crate hyperlane_plugin_cors

Crate hyperlane_plugin_cors 

Source
Expand description

hyperlane-plugin-cors

Zero-allocation precompiled Cross-Origin Resource Sharing (CORS) plugin for Hyperlane with XxHash3_64 origin matching, safe credential reflection, preflight handling, and Vary merging.

Structs§

CompiledCors
Precompiled zero-allocation CORS policy stored inside CorsPlugin.
CorsConfig
User-facing configuration for CorsPlugin.
CorsPlugin
Process-wide CorsPlugin singleton holding a precompiled CompiledCors policy.
CorsRequestHook
Opt-in request middleware applying CORS headers and answering OPTIONS preflight requests.
CorsResponseHook
Opt-in response middleware guaranteeing CORS headers persist even if a route replaced headers.

Enums§

AllowOrigin
Origin matching policy for CorsConfig.

Constants§

ACCESS_CONTROL_ALLOW_PRIVATE_NETWORK
Standard Access-Control-Allow-Private-Network response header name.
ACCESS_CONTROL_REQUEST_PRIVATE_NETWORK
Standard Access-Control-Request-Private-Network request header name.
CORS_WILDCARD
Wildcard value used for Access-Control-Allow-Origin and header lists.
DEFAULT_CORS_MAX_AGE_SECS
Default preflight cache duration in seconds (10 minutes).

Type Aliases§

OriginMatcher
Thread-safe predicate deciding whether an incoming Origin header value is permitted.