Add Docker ID integration

This commit is contained in:
Jonathan Leibiusky @xetorthio
2017-10-10 15:27:38 -03:00
parent 978fd78127
commit e9dd97e4e4
11 changed files with 125 additions and 10 deletions

View File

@@ -15,10 +15,11 @@ type CookieID struct {
func (c *CookieID) SetCookie(rw http.ResponseWriter) error {
if encoded, err := config.SecureCookie.Encode("id", c); err == nil {
cookie := &http.Cookie{
Name: "id",
Value: encoded,
Path: "/",
Secure: config.UseLetsEncrypt,
Name: "id",
Value: encoded,
Path: "/",
Secure: config.UseLetsEncrypt,
HttpOnly: true,
}
http.SetCookie(rw, cookie)
} else {