mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-04-28 07:06:38 -04:00
This is based on https://code.forgejo.org/go-chi/session/pulls/80. The remainder of this message is largely copied from there: For interoperability with reverse proxies and CDNs, setting a session cookie for no good reason (login is a good reason) is a PITA, because it makes caching of content for anonymous (not logged-in) users very hard, requiring all kinds of special casing and error prone workarounds. In particular in an age of exploitative AI bot crawling, being able to serve content for anonymous users from a fast, efficient page cache is an important option. This patch lays a foundation by using an option added to go-chi/session to not create session cookies always, but rather only when the respective session is non-empty. Test cases are included there and omitted here. |
||
|---|---|---|
| .. | ||
| api | ||
| common | ||
| install | ||
| private | ||
| utils | ||
| web | ||
| init.go | ||