MCPcopy
hub / github.com/gin-gonic/gin / SetSameSite

Method SetSameSite

context.go:1102–1104  ·  view source on GitHub ↗

SetSameSite with cookie

(samesite http.SameSite)

Source from the content-addressed store, hash-verified

1100
1101// SetSameSite with cookie
1102func (c *Context) SetSameSite(samesite http.SameSite) {
1103 c.sameSite = samesite
1104}
1105
1106// SetCookie adds a Set-Cookie header to the ResponseWriter's headers.
1107// The provided cookie must have a valid Name. Invalid cookies may be

Callers 3

TestContextSetCookieFunction · 0.80
TestContextSetCookieDataFunction · 0.80

Calls

no outgoing calls

Tested by 3

TestContextSetCookieFunction · 0.64
TestContextSetCookieDataFunction · 0.64