pub struct SecurityConfig {
pub csrf: bool,
pub origin_check: bool,
pub trust_proxy: bool,
pub body_limit_bytes: usize,
pub actions_per_minute: u32,
pub submits_per_minute: u32,
pub hide_benchmark: bool,
pub production: bool,
}Expand description
Global security configuration (shared by ResumaApp and FlowApp).
Fields§
§csrf: boolRequire CSRF token on POST /_resuma/action/* and POST /_resuma/submit/*.
origin_check: boolValidate Origin / Referer on mutating requests (same-origin).
trust_proxy: boolTrust X-Forwarded-For / X-Forwarded-Proto (set RESUMA_TRUST_PROXY=1 behind Fly/nginx).
body_limit_bytes: usizeMax POST body size in bytes.
actions_per_minute: u32Max action RPC calls per client IP per minute.
submits_per_minute: u32Max form submits per client IP per minute.
hide_benchmark: boolHide /_resuma/benchmark.json in production.
production: boolSanitize error messages returned to clients.
Implementations§
Trait Implementations§
Source§impl Clone for SecurityConfig
impl Clone for SecurityConfig
Source§fn clone(&self) -> SecurityConfig
fn clone(&self) -> SecurityConfig
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 moreSource§impl Debug for SecurityConfig
impl Debug for SecurityConfig
Auto Trait Implementations§
impl Freeze for SecurityConfig
impl RefUnwindSafe for SecurityConfig
impl Send for SecurityConfig
impl Sync for SecurityConfig
impl Unpin for SecurityConfig
impl UnsafeUnpin for SecurityConfig
impl UnwindSafe for SecurityConfig
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