gitea/templates/repo/issue/view_content
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
..
add_reaction.tmpl Fix dynamic content loading init problem (#33748) 2025-03-01 02:02:10 +00:00
attachments.tmpl Improve img lazy loading (#34804) 2025-06-21 14:53:22 +08:00
comments_authorlink.tmpl Include resource state events in Gitlab downloads (#29382) 2024-02-26 05:08:21 +01:00
comments_delete_time.tmpl Issue time estimate, meaningful time tracking (#23113) 2024-12-05 13:07:53 +00:00
comments.tmpl Fix issue close timeline icon (#36138) 2025-12-12 18:12:35 +00:00
context_menu.tmpl Support quote selected comments to reply (#32431) 2024-11-07 03:57:07 +00:00
conversation.tmpl feat(diff): Enable commenting on expanded lines in PR diffs (#35662) 2025-10-19 18:19:12 +08:00
pull_merge_box.tmpl Replace CSRF cookie with CrossOriginProtection (#36183) 2025-12-25 12:33:34 +02:00
pull_merge_instruction.tmpl Use configurable remote name for git commands (#35172) 2025-08-21 10:14:35 -07:00
reactions.tmpl Fix dynamic content loading init problem (#33748) 2025-03-01 02:02:10 +00:00
reference_issue_dialog.tmpl Replace CSRF cookie with CrossOriginProtection (#36183) 2025-12-25 12:33:34 +02:00
show_role.tmpl Add member, collaborator, contributor, and first-time contributor roles and tooltips (#26658) 2023-08-24 13:06:17 +08:00
sidebar.tmpl Fix bug of branch/tag selector in the issue sidebar (#32744) 2024-12-13 00:45:06 +00:00
update_branch_by_merge.tmpl Replace CSRF cookie with CrossOriginProtection (#36183) 2025-12-25 12:33:34 +02:00
watching.tmpl Migrate margin and padding helpers to tailwind (#30043) 2024-03-24 17:42:49 +01:00