1
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-16 21:56:40 -05:00

Merge remote-tracking branch 'origin/master'

This commit is contained in:
Matthew Holt 2020-12-03 11:33:18 -07:00
commit bac82073d0
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5

View file

@ -123,7 +123,11 @@ func loadConfig(configFile, adapterName string) ([]byte, string, error) {
var cfgAdapter caddyconfig.Adapter var cfgAdapter caddyconfig.Adapter
var err error var err error
if configFile != "" { if configFile != "" {
config, err = ioutil.ReadFile(configFile) if configFile == "-" {
config, err = ioutil.ReadAll(os.Stdin)
} else {
config, err = ioutil.ReadFile(configFile)
}
if err != nil { if err != nil {
return nil, "", fmt.Errorf("reading config file: %v", err) return nil, "", fmt.Errorf("reading config file: %v", err)
} }