Improve cookie setting.

This commit is contained in:
2024-12-06 23:43:47 +00:00
parent a6fa4d8789
commit 01ee7c4dc8
4 changed files with 23 additions and 21 deletions
-10
View File
@@ -6,8 +6,6 @@ import (
"log"
"net/http"
"os"
"github.com/gorilla/sessions"
)
const (
@@ -35,14 +33,6 @@ type Config struct {
HTTPClient *http.Client
}
var defaultSessionOptions = &sessions.Options{
HttpOnly: true,
Secure: false,
SameSite: http.SameSiteLaxMode,
MaxAge: ConstSessionTimeout,
Path: "/",
}
// CreateConfig creates a new Config with default values
func CreateConfig() *Config {
c := &Config{}