Skip to content

struct

ProxyPolicy

pub struct ProxyPolicy {
    pub resources: Vec<String>,
    pub max_count: u32,
}

What the route passes on.

Fields

resources

pub resources: Vec<String>

The FHIR resource types it allows (Practitioner, Appointment…).

max_count

pub max_count: u32

The most results a request may ask for.

Methods

read_only

pub fn read_only(resources: &[&str]) -> ProxyPolicy

A 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).

Trait implementations