FETCH
FETCH
is a wrapper for the Fetch API. This allows dynamically setting DNS records based on an external data source, e.g. the API of your cloud provider.
Compared to fetch
from Fetch API, FETCH
will call PANIC to terminate the execution of the script, and therefore DNSControl, if a network error occurs.
Otherwise the syntax of FETCH
is the same as fetch
.
FETCH
is not enabled by default. Please read the warnings below.
WARNING:
Relying on external sources adds a point of failure. If the external source doesn't work, your script won't either. Please make sure you are aware of the consequences.
Make sure DNSControl only uses verified configuration if you want to use
FETCH
. For example, an attacker can send Pull Requests to your config repo, and have your CI test malicious configurations and make arbitrary HTTP requests. Therefore,FETCH
must be explicitly enabled with flag--allow-fetch
on DNSControl invocation.
Last updated