jojo/templates/repo/diff
Gusted a4642af51a feat: replace cross origin protection (#9830)
Replace the anti-CSRF token with a [cross origin protection by Go](https://go.dev/doc/go1.25#nethttppkgnethttp) that uses a stateless way of verifying if a request was cross origin or not. This allows is to remove al lot of code and replace it with a few lines of code and we no longer have to hand roll this protection. The new protection uses indicators by the browser itself that indicate if the request is cross-origin, thus we no longer have to take care of ensuring the generated CSRF token is passed back to the server any request by the the browser will have send this indicator.

Resolves forgejo/forgejo#3538

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9830
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-10-29 22:43:22 +01:00
..
blob_excerpt.tmpl Fix the wrong line number in the diff view page when expanded twice. (#31431) 2024-06-23 12:48:08 +02:00
box.tmpl Implement single-commit PR review flow (#7155) 2025-06-17 09:31:50 +02:00
comment_form.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
comment_form_datahandler.tmpl Make sure fmt catches all templates (#20979) 2022-08-31 23:58:54 +08:00
comments.tmpl ui: update styling of comment headers and role labels (#6816) 2025-02-07 01:07:16 +00:00
compare.tmpl fix(ui): compare branches even with pull requests disabled (#8496) 2025-08-03 06:19:45 +02:00
conversation.tmpl ui: update styling of comment headers and role labels (#6816) 2025-02-07 01:07:16 +00:00
conversations.tmpl [BUG] split code conversations in diff tab (#2306) 2024-02-16 12:16:11 +00:00
csv_diff.tmpl Fix CSV diff for added/deleted files (#21189) 2022-09-17 10:45:32 +08:00
escape_title.tmpl cleanup locale function usage (#27227) 2023-09-24 20:31:58 +00:00
image_diff.tmpl Added alt's to <img> 2025-01-31 21:22:00 +00:00
new_comment.tmpl Do not reload page after adding comments in Pull Request reviews (#13877) 2021-01-08 23:49:55 +02:00
new_review.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
options_dropdown.tmpl Remove DiffFileList component 2025-01-19 18:56:18 +01:00
section_code.tmpl Add template linting via djlint (#25212) 2023-06-14 18:17:58 +00:00
section_split.tmpl Fix incorrect "blob excerpt" link when comparing files (#31013) 2024-05-24 10:08:24 +02:00
section_unified.tmpl Fix incorrect "blob excerpt" link when comparing files (#31013) 2024-05-24 10:08:24 +02:00
stats.tmpl Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00
whitespace_dropdown.tmpl Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00