ConfigLoader
ConfigLoader loads JSON configuration files and substitutes environment
variables using ${VAR|default} syntax. It is used internally by
SecurityConfig
and the mcp-gateway service,
and can be used directly for custom configuration needs.
Properties
config_paths
List of file paths checked during initialization. The first existing file is loaded.
Methods
Static method to locate a config file without loading it.
Get a configuration value by dot-notation path.
Get the raw configuration dictionary before environment variable substitution.
Get the path of the loaded config file.
Get an entire configuration section with environment variables substituted.
Check whether a configuration file was successfully loaded.
Merge configuration with environment variables matching a prefix.
Recursively substitute environment variables in configuration values.