Session middleware for go-chi
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
limiting-factor 7ef327391d
All checks were successful
test / test (push) Successful in 1m13s
fix: do not defer session on text/event-stream (#125)
- Refactor so the non deferred session handler is a named function that can be called
- Do not defer if it is a text/event-stream

Reviewed-on: #125
Reviewed-by: Gusted <gusted@noreply.code.forgejo.org>
2026-08-28 00:45:43 +00:00
.forgejo/workflows fix: only report coverage on pull requests (#128) 2026-08-28 00:44:51 +00:00
internal/test chore: update to golangci-lint v2 2025-05-23 18:22:47 +02:00
memcache Add Empty() receiver function to RawStore interface 2026-02-14 12:46:19 +01:00
mysql Add Empty() receiver function to RawStore interface 2026-02-14 12:46:19 +01:00
postgres chore: replace lib/pq with pgx (#99) 2026-04-03 15:00:31 +00:00
redis Add Empty() receiver function to RawStore interface 2026-02-14 12:46:19 +01:00
.gitignore [CHORE] Cleanup goconvey files 2024-08-23 21:33:03 +02:00
.golangci.yaml Update module golangci-lint to v2.6.0 (#61) 2025-10-31 23:39:25 +00:00
file.go Add Empty() receiver function to RawStore interface 2026-02-14 12:46:19 +01:00
file_test.go [CHORE] Simplify tests 2024-08-23 21:33:03 +02:00
go.mod Update module github.com/go-chi/chi/v5 to v5.3.2 (#124) 2026-08-25 22:57:21 +00:00
go.sum Update module github.com/go-chi/chi/v5 to v5.3.2 (#124) 2026-08-25 22:57:21 +00:00
LICENSE Initial commit 2014-07-15 19:57:55 -04:00
memory.go Add Empty() receiver function to RawStore interface 2026-02-14 12:46:19 +01:00
memory_test.go [CHORE] Simplify tests 2024-08-23 21:33:03 +02:00
README.md [FEAT] Use simpler config parsing for redis 2024-08-23 21:33:03 +02:00
renovate.json chore(renovate): use shared org preset 2024-11-07 15:29:47 +01:00
session.go fix: do not defer session on text/event-stream (#125) 2026-08-28 00:45:43 +00:00
session_test.go fix: do not defer session on text/event-stream (#125) 2026-08-28 00:45:43 +00:00
utils.go Update module golangci-lint to v2.6.0 (#61) 2025-10-31 23:39:25 +00:00

Session

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

Installation

go get code.forgejo.org/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.