You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/routers/api/v1
Lunny Xiao 9b4da56963
Remove ReverseProxy authentication from the API (#22219) (#22251)
backport from #22219

Since we changed the /api/v1/ routes to disallow session authentication
we also removed their reliance on CSRF. However, we left the
ReverseProxy authentication here - but this means that POSTs to the API
are no longer protected by CSRF.

Now, ReverseProxy authentication is a kind of session authentication,
and is therefore inconsistent with the removal of session from the API.

This PR proposes that we simply remove the ReverseProxy authentication
from the API and therefore users of the API must explicitly use tokens
or basic authentication.

Replace #22077
Close #22221 
Close #22077 

Signed-off-by: Andrew Thornton <art27@cantab.net>

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
2 years ago
..
activitypub Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2 years ago
admin Move some files into models' sub packages (#20262) 3 years ago
misc Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2 years ago
notify Move some files into models' sub packages (#20262) 3 years ago
org [API] teamSearch show teams with no members if user is admin (#21204) 2 years ago
packages Add support for Vagrant packages (#20930) 3 years ago
repo Allow empty assignees on pull request edit (#22150) (#22214) 2 years ago
settings Make mirror feature more configurable (#16957) 4 years ago
swagger Add API endpoint to get changed files of a PR (#21177) 2 years ago
user Record OAuth client type at registration (#21316) 2 years ago
utils Webhook for Wiki changes (#20219) 3 years ago
api.go Remove ReverseProxy authentication from the API (#22219) (#22251) 2 years ago
auth.go Remove legacy `+build:` constraint (#19582) 3 years ago
auth_windows.go Let web and API routes have different auth methods group (#19168) 3 years ago