summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2020-12-03 11:33:18 -0700
committerMatthew Holt <mholt@users.noreply.github.com>2020-12-03 11:33:18 -0700
commitbac82073d0e844280fc241126098719ed0552630 (patch)
tree1570bdbe56d0d3ac8574a405f3bd3b350d409d28
parentaca7ef0d4cb2b31325515b75c664baa607668c60 (diff)
parente7a5a3850f09d26ddb035a8da4d233efc6a81581 (diff)
Merge remote-tracking branch 'origin/master'
-rw-r--r--cmd/main.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/main.go b/cmd/main.go
index e92e71f..2dfb867 100644
--- a/cmd/main.go
+++ b/cmd/main.go
@@ -123,7 +123,11 @@ func loadConfig(configFile, adapterName string) ([]byte, string, error) {
var cfgAdapter caddyconfig.Adapter
var err error
if configFile != "" {
- config, err = ioutil.ReadFile(configFile)
+ if configFile == "-" {
+ config, err = ioutil.ReadAll(os.Stdin)
+ } else {
+ config, err = ioutil.ReadFile(configFile)
+ }
if err != nil {
return nil, "", fmt.Errorf("reading config file: %v", err)
}