http_ntlm: fix panic due to unintialized embedded field (#3120)

This commit is contained in:
Mohammed Al Sahaf 2020-03-08 03:58:44 +03:00 committed by GitHub
parent 217419f6d9
commit fb5168d3b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -60,8 +60,12 @@ type NTLMTransport struct {
// CaddyModule returns the Caddy module information.
func (NTLMTransport) CaddyModule() caddy.ModuleInfo {
return caddy.ModuleInfo{
ID: "http.reverse_proxy.transport.http_ntlm",
New: func() caddy.Module { return new(NTLMTransport) },
ID: "http.reverse_proxy.transport.http_ntlm",
New: func() caddy.Module {
m := new(NTLMTransport)
m.HTTPTransport = new(HTTPTransport)
return m
},
}
}