add cookie expires document and fix a flaw for session-cookie-expires
This commit is contained in:
parent
1e0268ad5b
commit
7aa5834948
4 changed files with 10 additions and 4 deletions
|
|
@ -219,7 +219,7 @@ var _ = framework.IngressNginxDescribe("Annotations - Affinity/Sticky Sessions",
|
|||
Expect(resp.StatusCode).Should(Equal(http.StatusOK))
|
||||
local, _ := time.LoadLocation("GMT")
|
||||
duration, _ := time.ParseDuration("48h")
|
||||
expected := time.Date(1970, time.January, 1, 0, 0, 0, 0, local).Add(duration).Format("Mon, 02-Jan-06 15:04:05 MST")
|
||||
expected := time.Now().In(local).Add(duration).Format("Mon, 02-Jan-06 15:04")
|
||||
Expect(resp.Header.Get("Set-Cookie")).Should(ContainSubstring(fmt.Sprintf("Expires=%s", expected)))
|
||||
Expect(resp.Header.Get("Set-Cookie")).Should(ContainSubstring("Max-Age=259200"))
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue