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: PathBuf
Root directory of static files.
compression: bool
Compression feature.
compression_static: bool
Compression static feature.
dir_listing: bool
Available on crate feature
directory-listing
only.Directory listing feature.
dir_listing_order: u8
Available on crate feature
directory-listing
only.Directory listing order feature.
dir_listing_format: DirListFmt
Available on crate feature
directory-listing
only.Directory listing format feature.
cors: Option<Configured>
CORS feature.
security_headers: bool
Security headers feature.
cache_control_headers: bool
Cache 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: String
Available on crate feature
basic-auth
only.Basic auth feature.
log_remote_address: bool
Log remote address feature.
redirect_trailing_slash: bool
Redirect trailing slash feature.
Ignore hidden files feature.
health: bool
Health 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