pub struct HostPolicy {
pub allowed: Vec<String>,
pub trust_proxy: bool,
}Expand description
Host allow-list enforced by DotfileGuard (security review M1).
A request whose effective host (the plain Host header, or the
forwarding headers behind trust_proxy) is not on the list is refused with
421 Misdirected Request before any handler runs, so a client cannot
address the server under a name it does not serve.
Fields§
§allowed: Vec<String>Permitted hosts (host or host:port, case-insensitive).
trust_proxy: boolHonour X-Forwarded-Host / Forwarded when computing the host.
Auto Trait Implementations§
impl Freeze for HostPolicy
impl RefUnwindSafe for HostPolicy
impl Send for HostPolicy
impl Sync for HostPolicy
impl Unpin for HostPolicy
impl UnsafeUnpin for HostPolicy
impl UnwindSafe for HostPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more