gitea/templates
silverwind 42d294941c
Replace CSRF cookie with CrossOriginProtection (#36183)
Removes the CSRF cookie in favor of
[`CrossOriginProtection`](https://pkg.go.dev/net/http#CrossOriginProtection)
which relies purely on HTTP headers.

Fixes: https://github.com/go-gitea/gitea/issues/11188
Fixes: https://github.com/go-gitea/gitea/issues/30333
Helps: https://github.com/go-gitea/gitea/issues/35107

TODOs:

- [x] Fix tests
- [ ] Ideally add tests to validates the protection

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-12-25 12:33:34 +02:00
..
admin Replace CSRF cookie with CrossOriginProtection (#36183) 2025-12-25 12:33:34 +02:00
api/packages/pypi Fix links in PyPI Simple Repository API page (#30594) 2024-04-20 01:15:14 +00:00
base Replace CSRF cookie with CrossOriginProtection (#36183) 2025-12-25 12:33:34 +02:00
custom Add footer extra links template (#9576) 2020-01-03 20:41:56 +02:00
devtest Refactor mail template and support preview (#34990) 2025-07-09 10:25:25 +08:00
explore Forks repository list page follow other repositories page (#34784) 2025-06-21 12:27:25 -07:00
mail Fix various bugs (#35684) 2025-10-19 00:37:50 +08:00
org Replace CSRF cookie with CrossOriginProtection (#36183) 2025-12-25 12:33:34 +02:00
package Replace CSRF cookie with CrossOriginProtection (#36183) 2025-12-25 12:33:34 +02:00
projects Replace CSRF cookie with CrossOriginProtection (#36183) 2025-12-25 12:33:34 +02:00
repo Replace CSRF cookie with CrossOriginProtection (#36183) 2025-12-25 12:33:34 +02:00
shared Replace CSRF cookie with CrossOriginProtection (#36183) 2025-12-25 12:33:34 +02:00
status Convert locale files from ini to json format (#35489) 2025-12-19 09:50:48 -08:00
swagger refactor: extract helper functions from SearchIssues (#36158) 2025-12-20 17:57:41 -08:00
user Replace CSRF cookie with CrossOriginProtection (#36183) 2025-12-25 12:33:34 +02:00
webhook Fix incorrect tailwind migration (#30007) 2024-03-22 20:51:29 +01:00
home.tmpl Convert locale files from ini to json format (#35489) 2025-12-19 09:50:48 -08:00
install.tmpl Fix various trivial frontend problems (#34263) 2025-04-24 09:11:54 +08:00
post-install.tmpl Add post-installation redirect based on admin account status (#34493) 2025-06-21 18:48:06 +00:00