Changed the cookie store options to work locally

This commit is contained in:
2025-09-12 19:03:20 +01:00
parent a0a1599e17
commit 81a6eaa5e4
3 changed files with 9 additions and 1 deletions
+1
View File
@@ -26,6 +26,7 @@ There are many features to be implemented!
- [X] API (not complete, but going)
- [ ] Add more logging (and configure the logger)
- [ ] Need to add many UTs
- [ ] Figure out how to distribute the database (the migrations and whatnot problems)
- [ ] Need to think about where the authentication endpoints are its separation
of concerns
- [ ] Create an interface to get data from a QR code so that we can have both
+7
View File
@@ -83,6 +83,13 @@ func startWebserver() {
// setRoutes(router)
store := cookie.NewStore([]byte("secret"))
store.Options(sessions.Options{
Path: "/",
MaxAge: int(time.Hour * 24),
HttpOnly: true,
Secure: false,
SameSite: http.SameSiteLaxMode,
})
router.Use(sessions.Sessions("mysessions", store))
// Set auth groups
+1 -1
View File
@@ -5,4 +5,4 @@ REQUIRED_VARS := registry repo
$(foreach v,$(REQUIRED_VARS),\
$(if $(value $(v)),,$(error Variable '$(v)' is required but empty)))
tag = v0.0.83-alpha
tag = v0.0.91-alpha