class Amber::Environment::Loader

Defined in:

amber/environment/loader.cr

Constant Summary

LIST_OF_V2_ONLY_SERVER_KEYS = ["trusted_proxies", "trusted_proxy_headers", "unix_socket"] of ::String

Settings the flat V1 format cannot carry: in a V1 file they would be dropped without a word, leaving the defaults in force.

Constructors

Instance Method Summary

Constructor Detail

def self.new(environment : Amber::Environment::EnvType = Amber.env.to_s, path : String = Amber.path) #

[View source]

Instance Method Detail

def detect_format(yaml_content : String) : Symbol #

Detect whether a YAML string uses the V1 flat format or the V2 nested format.

V2 format has a "server" key that is a mapping (Hash). V1 format has "host", "port" at the root level.


[View source]
def settings #

[View source]