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:
@ -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
|
||||
|
Reference in New Issue
Block a user