Skip to content

Commit

Permalink
TT-6232 better session store handling (#350)
Browse files Browse the repository at this point in the history
* better session store handling

* separate when SetupSessionStore is being called

* separate when SetupSessionStore is being called
  • Loading branch information
sredxny authored Nov 29, 2023
1 parent e865fd4 commit 3dde713
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func init() {
}

tothic.TothErrorHandler = errors.HandleError
tothic.SetupSessionStore()
}

func main() {
Expand Down
2 changes: 1 addition & 1 deletion tothic/tothic.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (p PathParam) MarshalBinary() ([]byte, error) {
return json.Marshal(p)
}

func init() {
func SetupSessionStore() {
key := KeyFromEnv()
Store = sessions.NewCookieStore([]byte(key))
}
Expand Down

0 comments on commit 3dde713

Please sign in to comment.