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
()
| 597 | // }) |
| 598 | // }) |
| 599 | func 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", |
no test coverage detected