AppVersionValidator
Simple Plug to validate the app version that is sent in an API header to make sure that the API should respond as normal, or just return an error.
The error we are using is 418 I'm a Teapot
The API calls should contain a header of AppVersion
Installation
If available in Hex, the package can be installed
by adding app_version_validator to your list of dependencies in mix.exs:
def deps do
[
{:app_version_validator, "~> 0.1.0"}
]
endDocumentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/app_version_validator.
Configuration
config :app_version_validator, AppVersionValidator,
minimum_app_version: "1.0.0",
nil_version_allowed: true #optional