This repository has been archived on 2026-04-11. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
spend-sparrow/handler/middleware/default.go

16 lines
289 B
Go

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: "/",
}
}