MCPcopy Create free account
hub / github.com/goadesign/goa / CookieHTTPOnly

Function CookieHTTPOnly

dsl/http.go:599–606  ·  view source on GitHub ↗

CookieHTTPOnly initializes the "http-only" attribute of a HTTP response cookie with "HttpOnly". CookieHTTPOnly must appear in a Cookie expression. Example: var _ = Service("account", func() { Method("create", func() { Result(Account) HTTP(func() { Response(Sta

()

Source from the content-addressed store, hash-verified

597// })
598// })
599func CookieHTTPOnly() {
600 _, ok := eval.Current().(*expr.HTTPResponseExpr)
601 if !ok {
602 eval.IncompatibleDSL()
603 return
604 }
605 cookieAttribute("http-only", "HttpOnly")
606}
607
608// CookieSameSite initializes the "same-site" attribute of a HTTP response
609// cookie with "CookieSameSiteStrict", "CookieSameSiteLax", "CookieSameSiteNone",

Callers 1

cookie_dsls.goFile · 0.85

Calls 3

CurrentFunction · 0.92
IncompatibleDSLFunction · 0.92
cookieAttributeFunction · 0.85

Tested by

no test coverage detected