erldns_admin (erldns v10.5.5)
View SourceErldns admin API.
Configuration:
This application will read from your sys.config the following example:
{erldns, [
{admin, [
{port, 8083},
{tls, false},
{credentials, {~"username", ~"password"}},
{middleware, [my_custom_middleware, another_middleware]},
{routes, [{~"/custom/:action", my_custom_route_handler, #{}}]}
]}
]}The accepted values are:
port: an integer between1and65535indicating the port to listen on (default:8083without TLS and8483when TLS is enabled).tls:false, or{true, SslOpts}whereSslOptsis a list ofssl:tls_server_option/0, indicating whether to use TLS (default:false).credentials:falseif no authentication is required, or a tuple of{Username, Password}binary strings. If configured, all routes will require authentication (default:false).middleware: an optional list of cowboy compliant middleware modules to apply to all admin API requests (default:[]).routes: an optional list of additional routes to add to the admin API. This is a list ofcowboy_router:route_path()elements that will be prepended to the default routes (default:[]).