Skip to main content

Crate hyperlane_plugin_rewrite

Crate hyperlane_plugin_rewrite 

Source
Expand description

hyperlane-plugin-rewrite

High-performance HTTP URL rewrite and redirect plugin for Hyperlane with canonical host/HTTPS enforcement (X-Forwarded-Proto aware), trailing-slash and duplicate-slash normalization, O(1) XxHash3_64 exact tables, prefix strip/rewrite rules, and precompiled regex rules.

Structs§

CompiledRewrite
Precompiled zero-allocation-fast-path URL rewrite & redirect engine backing RewritePlugin.
ExactRewriteRule
Static exact-path redirect or internal rewrite entry.
PrefixRewriteRule
Segment-bounded path-prefix strip or rewrite entry.
RegexRewriteRule
Regular-expression rewrite or redirect definition.
RewriteConfig
User-facing configuration for RewritePlugin and CompiledRewrite.
RewriteHook
Opt-in request middleware performing canonical redirects, path normalization, and URL rewrites.
RewritePlugin
Process-wide RewritePlugin singleton storing a CompiledRewrite.

Enums§

RedirectStatus
Supported HTTP redirect status codes for short-circuit rewrite rules.
RewriteAction
Action taken when a rewrite rule matches an incoming request path.
RewriteError
Errors produced when compiling [RewriteConfig] into [CompiledRewrite].
RewriteOutcome
Outcome returned by [CompiledRewrite::apply] when evaluating a request context.
TrailingSlashMode
Trailing-slash normalization policy applied to non-root paths (path != "/").

Constants§

ATTR_ORIGINAL_PATH
Context attribute key preserving the pre-rewrite request path after an internal rewrite.