From 2b8ca09500ad16afe7baecf7359916f105124f55 Mon Sep 17 00:00:00 2001
From: Rohith <gambol99@gmail.com>
Date: Sun, 26 Nov 2017 22:30:41 +0000
Subject: [PATCH] Authentication Cookies

- need to use a prefix rather than just the name due to the cookie being split
---
 misc.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/misc.go b/misc.go
index 5e24d90..98c2494 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
-- 
GitLab