routed_security library

Classes

IpFilter
A filter for controlling access based on IP addresses.
IpFilterConfig
Immutable IP allow/deny settings.
NetworkMatcher
Utility for matching IP addresses against CIDR ranges.
RoutedSecurityConfig
Immutable configuration for RoutedSecurityProvider.
RoutedSecurityProvider
Registers CORS, trusted-proxy resolution, and optional IP filtering.
TrustedProxyConfig
Immutable trusted-proxy settings.
TrustedProxyResolver
A resolver that determines the client IP address, considering trusted proxies and headers. This is useful for applications deployed behind reverse proxies.

Enums

IpFilterAction
Defines the default behaviour when no allow/deny rule matches.

Functions

corsMiddleware(CorsConfig config) → Middleware
Applies CORS headers and handles browser preflight requests.
registerRoutedSecurityProviders() → void
Registers the security provider factory in the shared registry.