Struct static_web_server::handler::RequestHandlerOpts
source · pub struct RequestHandlerOpts {Show 18 fields
pub root_dir: PathBuf,
pub compression: bool,
pub compression_static: bool,
pub dir_listing: bool,
pub dir_listing_order: u8,
pub dir_listing_format: DirListFmt,
pub cors: Option<Configured>,
pub security_headers: bool,
pub cache_control_headers: bool,
pub page404: Vec<u8>,
pub page50x: Vec<u8>,
pub page_fallback: Vec<u8>,
pub basic_auth: String,
pub log_remote_address: bool,
pub redirect_trailing_slash: bool,
pub ignore_hidden_files: bool,
pub health: bool,
pub advanced_opts: Option<Advanced>,
}Expand description
It defines options for a request handler.
Fields§
§root_dir: PathBufRoot directory of static files.
compression: boolCompression feature.
compression_static: boolCompression static feature.
dir_listing: boolAvailable on crate feature
directory-listing only.Directory listing feature.
dir_listing_order: u8Available on crate feature
directory-listing only.Directory listing order feature.
dir_listing_format: DirListFmtAvailable on crate feature
directory-listing only.Directory listing format feature.
cors: Option<Configured>CORS feature.
security_headers: boolSecurity headers feature.
cache_control_headers: boolCache control headers feature.
page404: Vec<u8>Page for 404 errors.
page50x: Vec<u8>Page for 50x errors.
page_fallback: Vec<u8>Available on crate feature
fallback-page only.Page fallback feature.
basic_auth: StringAvailable on crate feature
basic-auth only.Basic auth feature.
log_remote_address: boolLog remote address feature.
redirect_trailing_slash: boolRedirect trailing slash feature.
Ignore hidden files feature.
health: boolHealth endpoint feature.
advanced_opts: Option<Advanced>Advanced options from the config file.
Auto Trait Implementations§
impl RefUnwindSafe for RequestHandlerOpts
impl Send for RequestHandlerOpts
impl Sync for RequestHandlerOpts
impl Unpin for RequestHandlerOpts
impl UnwindSafe for RequestHandlerOpts
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