Module util

Source

Re-exports§

pub use error_pages::*;
pub use log_placeholders::*;
pub use proxy_protocol::*;
pub use send_async_io::*;
pub use url_sanitizer::*;

Modules§

error_pages 🔒
log_placeholders 🔒
proxy_protocol 🔒
send_async_io 🔒
url_sanitizer 🔒

Structs§

IpBlockList
The IP blocklist
ModuleCache
A highly optimized cache that stores modules according to server configuration
MonoioFileStream
A wrapper over Monoio’s File that implements a Stream trait.
NoServerVerifier
A server certificate verifier that always returns a successful verification.
SendRwStream
A wrapper over struct implementing Tokio’s AsyncRead and AsyncWrite (no need for struct to be Send) that implements Stream and Sink trait.
TtlCache
A TTL cache

Constants§

SERVER_SOFTWARE
The web server software identifier

Functions§

anti_xss
Escapes some characters as HTML entities, preventing XSS vulnerabilities
is_localhost
Determines if the server configuration filter implies localhost.
match_hostname
Matches the request hostname against a configured hostname
match_location
Matches the request location against a configured location
replace_header_placeholders
sizify
Converts the file size into a human-readable one