diff --git a/misc.go b/misc.go index 5e24d906a7e4cbb919e44dfd96c749a8b365f243..98c249493ca6bde600d5b8dedd04081a264f4ab7 100644 --- a/misc.go +++ b/misc.go @@ -20,6 +20,7 @@ import ( "fmt" "net/http" "path" + "strings" "time" "github.com/coreos/go-oidc/jose" @@ -38,7 +39,7 @@ func filterCookies(req *http.Request, filter []string) error { var found bool // @step: does this cookie match our filter? for _, n := range filter { - if x.Name == n { + if strings.HasPrefix(x.Name, n) { req.AddCookie(&http.Cookie{Name: x.Name, Value: "censored"}) found = true break