Revert "fix: send, echo, and remove a copy of the cookie without the domain to try and work better with localhost"
This reverts commit ad23104700
.
This commit is contained in:
parent
ad23104700
commit
6d12ef9b94
|
@ -120,14 +120,6 @@ func SetAuthCookie(jc jape.Context, c *config.Manager, jwt string) {
|
||||||
Path: "/",
|
Path: "/",
|
||||||
Domain: c.Config().Core.Domain,
|
Domain: c.Config().Core.Domain,
|
||||||
})
|
})
|
||||||
http.SetCookie(jc.ResponseWriter, &http.Cookie{
|
|
||||||
Name: routeableApi.AuthTokenName(),
|
|
||||||
Value: jwt,
|
|
||||||
MaxAge: int((24 * time.Hour).Seconds()),
|
|
||||||
Secure: true,
|
|
||||||
HttpOnly: true,
|
|
||||||
Path: "/",
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,14 +159,6 @@ func EchoAuthCookie(jc jape.Context, config *config.Manager) {
|
||||||
Path: "/",
|
Path: "/",
|
||||||
Domain: config.Config().Core.Domain,
|
Domain: config.Config().Core.Domain,
|
||||||
})
|
})
|
||||||
http.SetCookie(jc.ResponseWriter, &http.Cookie{
|
|
||||||
Name: cookies[0].Name,
|
|
||||||
Value: cookies[0].Value,
|
|
||||||
MaxAge: int(exp.Time.Sub(time.Now()).Seconds()),
|
|
||||||
Secure: true,
|
|
||||||
HttpOnly: true,
|
|
||||||
Path: "/",
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,14 +183,5 @@ func ClearAuthCookie(jc jape.Context, config *config.Manager) {
|
||||||
Path: "/",
|
Path: "/",
|
||||||
Domain: config.Config().Core.Domain,
|
Domain: config.Config().Core.Domain,
|
||||||
})
|
})
|
||||||
http.SetCookie(jc.ResponseWriter, &http.Cookie{
|
|
||||||
Name: routeableApi.AuthTokenName(),
|
|
||||||
Value: "",
|
|
||||||
Expires: time.Date(1970, 1, 1, 0, 0, 0, 0, time.UTC),
|
|
||||||
MaxAge: -1,
|
|
||||||
Secure: true,
|
|
||||||
HttpOnly: true,
|
|
||||||
Path: "/",
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue