Rename session cookie

This commit is contained in:
Melon 2024-02-07 10:55:23 +00:00
parent c1071e4a73
commit 33faf6aa5f
Signed by: melon
GPG Key ID: 6C9D970C50D26A25

View File

@ -18,6 +18,7 @@ import (
"github.com/go-oauth2/oauth2/v4/manage" "github.com/go-oauth2/oauth2/v4/manage"
"github.com/go-oauth2/oauth2/v4/server" "github.com/go-oauth2/oauth2/v4/server"
"github.com/go-oauth2/oauth2/v4/store" "github.com/go-oauth2/oauth2/v4/store"
"github.com/go-session/session"
"github.com/google/uuid" "github.com/google/uuid"
"github.com/julienschmidt/httprouter" "github.com/julienschmidt/httprouter"
"log" "log"
@ -53,6 +54,8 @@ type mailLinkKey struct {
} }
func NewHttpServer(conf Conf, db *database.DB, signingKey mjwt.Signer) *http.Server { func NewHttpServer(conf Conf, db *database.DB, signingKey mjwt.Signer) *http.Server {
session.InitManager(session.SetCookieName("tulip_session"))
r := httprouter.New() r := httprouter.New()
// remove last slash from baseUrl // remove last slash from baseUrl