Lightning.Config.Utils (Lightning v2.19.0-pre)
View SourceUtility functions for working with the application environment.
Summary
Functions
Retrieve a value nested in the application environment.
Parse a comma-separated list of hostnames into a normalised list.
Functions
Retrieve a value nested in the application environment.
Parse a comma-separated list of hostnames into a normalised list.
Each entry is trimmed, downcased and has a single trailing dot stripped, so
operators get the same normalisation the egress guard applies at match time.
Empty or whitespace-only input returns [].
Raises ArgumentError, naming every offending entry, when any entry is empty
or looks like something other than a bare hostname: a scheme (://), a path
(/), an @, or internal whitespace. Bad entries are never silently dropped.
Colon-bearing forms (host:port, bracketed IPv6 literals) are passed through untouched.