pub enum HiddenFiles {
Deny,
Serve,
}Expand description
Whether dot-prefixed request-path segments may be served.
The default is HiddenFiles::Deny: a served root is frequently a build output
directory, a repository working copy, or a folder someone dropped a .env into, and
serving .git/config or .env to anyone who guesses the name is a credential leak
that no traversal check catches — the files are legitimately inside the root.
Variants§
Deny
Dot-prefixed segments answer as a miss.
Serve
Dot-prefixed segments resolve like any other name.
Trait Implementations§
Source§impl Clone for HiddenFiles
impl Clone for HiddenFiles
Source§fn clone(&self) -> HiddenFiles
fn clone(&self) -> HiddenFiles
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for HiddenFiles
Source§impl Debug for HiddenFiles
impl Debug for HiddenFiles
impl Eq for HiddenFiles
Source§impl PartialEq for HiddenFiles
impl PartialEq for HiddenFiles
impl StructuralPartialEq for HiddenFiles
Auto Trait Implementations§
impl Freeze for HiddenFiles
impl RefUnwindSafe for HiddenFiles
impl Send for HiddenFiles
impl Sync for HiddenFiles
impl Unpin for HiddenFiles
impl UnsafeUnpin for HiddenFiles
impl UnwindSafe for HiddenFiles
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