session for go-chi
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Andrew Thornton e056dc3791
continuous-integration/drone/push Build is passing Details
Prevent panics due to EOF in gob.Decode (#5)
If a session file has been truncated due to server disk errors then the FileReader may return an io.EOF error on Read().

This then percolates up to the session manager which will panic.

This PR instead suggests that we simply swallow this error and start off again with empty session data.

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-on: #5
Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-committed-by: Andrew Thornton <art27@cantab.net>
3 months ago
couchbase remove macaron 2 years ago
ledis Upgrade chi to v5 1 year ago
memcache Upgrade chi to v5 1 year ago
mysql Upgrade chi to v5 1 year ago
postgres Upgrade chi to v5 1 year ago
redis Upgrade chi to v5 1 year ago
.drone.yml Fix test and lint 2 years ago
.gitignore Update github.com/go-redis/redis to v6.15.2 (#4) 4 years ago
LICENSE Initial commit 9 years ago
README.md Correct README links (#2) 2 years ago
file.go Prevent panics due to EOF in gob.Decode (#5) 3 months ago
file_test.go upgrade with macaron 8 years ago
go.mod Upgrade chi to v5 1 year ago
go.sum Upgrade chi to v5 1 year ago
memory.go Fix test and lint 2 years ago
memory_test.go upgrade with macaron 8 years ago
secret.go Add samesite cookie options (#16) 2 years ago
session.go Provide function to regenerate RawStore within session (#4) 1 year ago
session_test.go Provide function to regenerate RawStore within session (#4) 1 year ago
utils.go Fix test and lint 2 years ago

README.md

Session

Middleware session provides session management which based on a fork of Macaron Session for go-chi. It can use many session providers, including memory, file, Redis, Memcache, PostgreSQL, MySQL, Couchbase, Ledis and Nodb.

Installation

go get gitea.com/go-chi/session

Credits

This package is a modified version of go-macaron/session.

License

This project is under the Apache License, Version 2.0. See the LICENSE file for the full license text.