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§
- Compiled
Cors - Precompiled zero-allocation CORS policy stored inside
CorsPlugin. - Cors
Config - User-facing configuration for
CorsPlugin. - Cors
Plugin - Process-wide
CorsPluginsingleton holding a precompiledCompiledCorspolicy. - Cors
Request Hook - Opt-in request middleware applying CORS headers and answering
OPTIONSpreflight requests. - Cors
Response Hook - Opt-in response middleware guaranteeing CORS headers persist even if a route replaced headers.
Enums§
- Allow
Origin - Origin matching policy for
CorsConfig.
Constants§
- ACCESS_
CONTROL_ ALLOW_ PRIVATE_ NETWORK - Standard
Access-Control-Allow-Private-Networkresponse header name. - ACCESS_
CONTROL_ REQUEST_ PRIVATE_ NETWORK - Standard
Access-Control-Request-Private-Networkrequest header name. - CORS_
WILDCARD - Wildcard value used for
Access-Control-Allow-Originand header lists. - DEFAULT_
CORS_ MAX_ AGE_ SECS - Default preflight cache duration in seconds (10 minutes).
Type Aliases§
- Origin
Matcher - Thread-safe predicate deciding whether an incoming
Originheader value is permitted.