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
()
| 570 | // }) |
| 571 | // }) |
| 572 | func 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". |
no test coverage detected