struct
ProxyPolicy
pub struct ProxyPolicy {
pub resources: Vec<String>,
pub max_count: u32,
}What the route passes on.
Fields
Methods
read_only
pub fn read_only(resources: &[&str]) -> ProxyPolicyA policy allowing reads, and only reads, of resources.
check
pub fn check(&self, query: &str) -> Result<(String, Vec<(String, String)>), String>Validate a proxied query string: the resource must be allowed, and parameters that pull in other resources (_include, _revinclude, _has, _contained) are refused. Returns the resource and the parameters to forward (with _count capped).