本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
438B

  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. SameSite: options.SameSite,
  15. }
  16. }
上海开阖软件有限公司 沪ICP备12045867号-1