Skip to content
Snippets Groups Projects
Commit 2b8ca095 authored by Rohith's avatar Rohith Committed by Bruno Oliveira da Silva
Browse files

Authentication Cookies

- need to use a prefix rather than just the name due to the cookie being split
parent 07db24b2
Branches
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment