Fix: cookie; add llm parser interface
This commit is contained in:
@ -142,19 +142,18 @@ func makeCookie(username string, remote string) (*http.Cookie, error) {
|
||||
cookieValue := base64.URLEncoding.EncodeToString([]byte(
|
||||
string(signature) + sessionToken))
|
||||
cookie := &http.Cookie{
|
||||
Name: cookieName,
|
||||
Value: cookieValue,
|
||||
// Secure: true,
|
||||
Name: cookieName,
|
||||
Value: cookieValue,
|
||||
Secure: true,
|
||||
HttpOnly: true,
|
||||
SameSite: http.SameSiteNoneMode,
|
||||
// Domain: cfg.ServerConfig.Host,
|
||||
}
|
||||
log.Info("check remote addr for cookie set",
|
||||
"remote", remote, "session", session)
|
||||
if strings.Contains(remote, "192.168.0") {
|
||||
// cookie.Domain = "192.168.0.101"
|
||||
cookie.Domain = ""
|
||||
cookie.Domain = "192.168.0.106"
|
||||
cookie.SameSite = http.SameSiteLaxMode
|
||||
cookie.Secure = false
|
||||
log.Info("changing cookie domain", "domain", cookie.Domain)
|
||||
}
|
||||
// set ctx?
|
||||
|
@ -254,6 +254,7 @@ func HandleGiveClue(w http.ResponseWriter, r *http.Request) {
|
||||
fi.Room.ActionHistory = append(fi.Room.ActionHistory, action)
|
||||
fi.Room.MimeDone = true
|
||||
notify(models.NotifyBacklogPrefix+fi.Room.ID, clue+num)
|
||||
notifyBotIfNeeded(fi)
|
||||
if err := saveFullInfo(fi); err != nil {
|
||||
abortWithError(w, err.Error())
|
||||
return
|
||||
|
Reference in New Issue
Block a user