diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2019-11-06 00:16:16 -0700 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2019-11-06 00:16:16 -0700 |
commit | 95615f537770bf98d2db67c619111ec0efc880cc (patch) | |
tree | b81da0f25b83c29782124a77970e21ac718bcfd1 /modules | |
parent | 8e515289cbde97fb7ac18a3d035e03f8d0c8befe (diff) |
reverse_proxy: Fix NTLM auth detection
D'oh. Got mixed up in a refactoring.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/caddyhttp/reverseproxy/ntlm.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/caddyhttp/reverseproxy/ntlm.go b/modules/caddyhttp/reverseproxy/ntlm.go index 06ee4f8..e2d46b4 100644 --- a/modules/caddyhttp/reverseproxy/ntlm.go +++ b/modules/caddyhttp/reverseproxy/ntlm.go @@ -19,6 +19,7 @@ import ( "fmt" "net" "net/http" + "strings" "sync" "github.com/caddyserver/caddy/v2" @@ -205,7 +206,8 @@ func (n *NTLMTransport) deleteTransportsForClient(clientAddr string) { // header with values "NTLM" or "Negotiate". func requestHasAuth(req *http.Request) bool { for _, val := range req.Header["Authorization"] { - if val == "NTLM" || val == "Negotiate" { + if strings.HasPrefix(val, "NTLM") || + strings.HasPrefix(val, "Negotiate") { return true } } |