Skip to content

Allow runtime environment config

Compare
Choose a tag to compare
@samueljseay samueljseay released this 08 Oct 02:13
· 31 commits to master since this release

Configuration can now accept any of the following:

  • Standard variables:
config :recaptcha,
  public_key: "some public key string",
  secret: "some private string"
  • Environment variable at compile time:
config :recaptcha,
  public_key: System.get_env("RECAPTCHA_PUBLIC_KEY"),
  secret: System.get_env("RECAPTCHA_PRIVATE_KEY")
  • Environment variable at runtime:
config :recaptcha,
  public_key: {:system, "RECPATCHA_PUBLIC_KEY"},
  secret: {:system, "RECAPTCHA_PRIVATE_KEY"}

Thanks to @kennyballou for the addition 👍