pub struct Config {
pub body_limit: usize,
pub proxy_header: String,
}Fields§
§body_limit: usizeMax body size that the server accepts.
Default: 4MB
proxy_header: StringProxyHeader 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: “”
Implementations§
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§
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