Commit f5437912 authored by Adrien Dorsaz's avatar Adrien Dorsaz

add Accept-Language support

parent f5038808
Pipeline #177 passed with stage
in 16 minutes and 56 seconds
......@@ -62,7 +62,8 @@ def get_crt(config, log=LOGGER):
# main code
webclient = urllib.request.build_opener()
webclient.addheaders = [('User-Agent', 'acme-dns-tiny/2.0')]
webclient.addheaders = [('User-Agent', 'acme-dns-tiny/2.0'), ('Accept-Language', config["acmednstiny"].get("Language", "en"))]
log.info("Read ACME directory.")
directory = webclient.open(config["acmednstiny"]["ACMEDirectory"])
acme_config = json.loads(directory.read().decode("utf8"))
......@@ -285,7 +286,7 @@ See example.ini file to configure correctly this script.
config = ConfigParser()
config.read_dict({"acmednstiny": {"ACMEDirectory": "https://acme-staging-v02.api.letsencrypt.org/directory",
"CheckChallengeDelay": 2},
"CheckChallengeDelay": 3},
"DNS": {"Port": "53"}})
config.read(args.configfile)
......
......@@ -3,9 +3,11 @@
AccountKeyFile = account.key
# Required readable CSR file
CSRFile = domain.csr
# Optional ACME directory url (default: https://acme-staging-v02.api.letsencrypt.org/directory)
# Optional ACME directory url
# Default: https://acme-staging-v02.api.letsencrypt.org/directory
ACMEDirectory = https://acme-staging-v02.api.letsencrypt.org/directory
# Optional time in seconds to wait between DNS update and challenge check (default: 3)
# Optional time in seconds to wait between DNS update and challenge check
# Default: 3
CheckChallengeDelay = 3
# Optional To be able to be reached by ACME provider (e.g. to warn about
# certificate expicration), you can provide some contact informations.
......@@ -14,7 +16,12 @@ CheckChallengeDelay = 3
# URI and can support more of contact.
# For the mailto URI, the email address part must contains only one address
# without header fields (see [RFC6068]).
# Default: none
Contacts = mailto:mail@example.com;mailto:mail2@example.org
# Optional to give hint to the ACME server about your prefered language for errors given by their server
# See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language for more informations
# Default: en
Language = en
[TSIGKeyring]
# Required TSIG key name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment