dns: pick the extra_records_path format by file extension

HuJSON and YAML records work too; an unknown extension fails instead of being
parsed as JSON.
This commit is contained in:
Kristoffer Dalby
2026-09-28 13:33:22 +00:00
committed by Kristoffer Dalby
parent dd8ce695cf
commit 906016beb4
4 changed files with 12 additions and 9 deletions
+2 -1
View File
@@ -353,7 +353,8 @@ dns:
# # you can also put it in one line
# - { name: "prometheus.myvpn.example.com", type: "A", value: "100.64.0.3" }
#
# Alternatively, extra DNS records can be loaded from a JSON file.
# Alternatively, extra DNS records can be loaded from a file. The extension
# picks the format: .json, .hujson, .yaml or .yml.
# Headscale processes this file on each change.
# extra_records_path: /var/lib/headscale/extra-records.json