1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

New feature: FETCH() permits http gets in dnsconfig.js (#1007)

add PANIC() and error-handled FETCH()
This commit is contained in:
Yuhui Xu
2021-01-06 23:45:32 +08:00
committed by GitHub
parent 120694bfad
commit 6efedd689d
8 changed files with 253 additions and 130 deletions

View File

@ -10,6 +10,7 @@ import (
"github.com/urfave/cli/v2"
"github.com/StackExchange/dnscontrol/v3/models"
"github.com/StackExchange/dnscontrol/v3/pkg/js"
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
)
@ -52,6 +53,11 @@ func Run(v string) int {
Usage: "Enable detailed logging",
Destination: &printer.DefaultPrinter.Verbose,
},
&cli.BoolFlag{
Name: "allow-fetch",
Usage: "Enable JS fetch(), dangerous on untrusted code!",
Destination: &js.EnableFetch,
},
}
sort.Sort(cli.CommandsByName(commands))
app.Commands = commands