Skip to main content

load_api_keys

Function load_api_keys 

Source
pub fn load_api_keys() -> Result<AuthState>
Expand description

Load API keys from the MOLD_API_KEY environment variable.

Formats:

  • Single key: MOLD_API_KEY=my-secret
  • Comma-separated: MOLD_API_KEY=key1,key2,key3
  • File reference: MOLD_API_KEY=@/path/to/keys.txt (one key per line)

Returns None when the variable is unset or empty (auth disabled).