A URL path must start with a /

This commit is contained in:
Frank Denis 2019-12-10 16:04:37 +01:00
parent 4d5c940616
commit 3b4d6c532d
1 changed files with 3 additions and 0 deletions

View File

@ -362,6 +362,9 @@ func ConfigLoad(proxy *Proxy, flags *ConfigFlags) error {
proxy.listenAddresses = config.ListenAddresses
proxy.localDoHListenAddresses = config.LocalDoH.ListenAddresses
if len(config.LocalDoH.Path) > 0 && config.LocalDoH.Path[0] != '/' {
dlog.Fatalf("local DoH: [%s] cannot be a valid URL path. Read the documentation", config.LocalDoH.Path)
}
proxy.localDoHPath = config.LocalDoH.Path
proxy.localDoHCertFile = config.LocalDoH.CertFile
proxy.localDoHCertKeyFile = config.LocalDoH.CertKeyFile