pub struct Config { /* private fields */ }Implementations§
Source§impl Config
impl Config
Sourcepub fn body_limit(self, limit: usize) -> Self
pub fn body_limit(self, limit: usize) -> Self
Set the maximum body size that the server accepts
Default: 4MB
Sourcepub fn proxy_header(self, header: impl Into<String>) -> Self
pub fn proxy_header(self, header: impl Into<String>) -> Self
ProxyHeader will enable c.req.ip() to return the value of the given header key By default c.req.ip() will return the Remote IP from the TCP connection This property can be useful if you are behind a load balancer: X-Forwarded-* NOTE: headers are easily spoofed and the detected IP addresses are unreliable.
Default: “”
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)