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.
continuous-integration/drone/push Build is passing
Details
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 | 2 years ago | |
ledis | 1 year ago | |
memcache | 1 year ago | |
mysql | 1 year ago | |
postgres | 1 year ago | |
redis | 1 year ago | |
.drone.yml | 2 years ago | |
.gitignore | 4 years ago | |
LICENSE | 9 years ago | |
README.md | 2 years ago | |
file.go | 3 months ago | |
file_test.go | 8 years ago | |
go.mod | 1 year ago | |
go.sum | 1 year ago | |
memory.go | 2 years ago | |
memory_test.go | 8 years ago | |
secret.go | 2 years ago | |
session.go | 1 year ago | |
session_test.go | 1 year ago | |
utils.go | 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.