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

Function CookieSecure

dsl/http.go:572–579  ·  view source on GitHub ↗

CookieSecure initializes the "secure" attribute of a HTTP response cookie with "Secure". CookieSecure must appear in a Cookie expression. Example: var _ = Service("account", func() { Method("create", func() { Result(Account) HTTP(func() { Response(StatusCreate

()

Source from the content-addressed store, hash-verified

570// })
571// })
572func CookieSecure() {
573 _, ok := eval.Current().(*expr.HTTPResponseExpr)
574 if !ok {
575 eval.IncompatibleDSL()
576 return
577 }
578 cookieAttribute("secure", "Secure")
579}
580
581// CookieHTTPOnly initializes the "http-only" attribute of a HTTP response
582// cookie with "HttpOnly".

Callers 1

cookie_dsls.goFile · 0.85

Calls 3

CurrentFunction · 0.92
IncompatibleDSLFunction · 0.92
cookieAttributeFunction · 0.85

Tested by

no test coverage detected