Skip to main content

load_yaml

Function load_yaml 

Source
pub fn load_yaml<T: DeserializeOwned>(path: &Path) -> Result<T, Box<dyn Error>>
Expand description

Loads a YAML file and deserializes into T without resolving ${ENV_VAR} placeholders — they are preserved verbatim in the parsed structure.

Used for gateway.yaml: its contents are served back to the Web UI by the Admin API, so resolving placeholders at load time would leak secret values into API responses and config exports. Resolution happens at the point of consumption instead (see interpolate_env_json).