package middleware import "net/http" func CreateSessionCookie(sessionId string) http.Cookie { return http.Cookie{ Name: "id", Value: sessionId, MaxAge: 60 * 60 * 8, // 8 hours Secure: true, HttpOnly: true, SameSite: http.SameSiteStrictMode, Path: "/", } }