Add path attribute to split cookies (#6298)
* Add "Path" attribute to "/" Without this the browser defaults to a path of the parent of the path in the request. See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Set-Cookie#pathpath-value This means the cookie isn't included in api requests since the path is too restrictive * Update tests with split cookie path attribute
This commit is contained in:
1 parent
7d3c0b4732
commit
ef75427403
3 files changed
+6
-2
No files matched your search
@@ -92,6 +92,8 @@ func TestAuthenticationHandler(t *testing.T) {
|
||||
assert.NotEmpty(t, cookies[handlers.JsVisibleCookieName].Value)
|
||||
assert.True(t, cookies[handlers.HttpOnlyCookieName].HttpOnly)
|
||||
assert.False(t, cookies[handlers.JsVisibleCookieName].HttpOnly)
|
||||
assert.Equal(t, cookies[handlers.HttpOnlyCookieName].Path, "/")
|
||||
assert.Equal(t, cookies[handlers.JsVisibleCookieName].Path, "/")
|
||||
tok = cookies[handlers.JsVisibleCookieName].Value
|
||||
|
||||
pubId = attrs["id"].(string)
|
||||
|
||||
Reference in new issue
Block a user