Skip to main content

Module rewrites

Module rewrites 

Source
Expand description

Module that allows to rewrite request URLs with pattern matching support.

See crate::redirects for the ReDoS / pattern-complexity notes that also apply to rewrites: patterns are admin-supplied, evaluated by the non-backtracking regex_lite engine, and URIs longer than [crate::redirects::MAX_URI_LEN_FOR_REGEX] are skipped.

Functions§

rewrite_uri_path
It returns a rewrite’s destination path if the current request uri matches against the provided rewrites array.