cookie.go 409 B

12345678910111213141516171819
  1. // +build !go1.11
  2. package sessions
  3. import "net/http"
  4. // newCookieFromOptions returns an http.Cookie with the options set.
  5. func newCookieFromOptions(name, value string, options *Options) *http.Cookie {
  6. return &http.Cookie{
  7. Name: name,
  8. Value: value,
  9. Path: options.Path,
  10. Domain: options.Domain,
  11. MaxAge: options.MaxAge,
  12. Secure: options.Secure,
  13. HttpOnly: options.HttpOnly,
  14. }
  15. }