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.
forgejo/modules/context
zeripath 47fd156936
Use route rather than use thus reducing the number of stack frames (#15301)
Since the move to Chi the number of stack frames has proliferated somewhat catastrophically and we're up to 96 frames with multiple tests of the url outside of a trie which is inefficient.

This PR reduces the number of stack frames by 6 through careful use of Route, moves Captcha into its own router so that it only fires on Captcha routes, similarly for avatars and repo-avatars.

The robots.txt, / and apple-touch-icon.png are moved out of requiring Contexter.

It moves access logger higher in the stack frame because there is no reason why it can't be higher.

Extract from #15186
Contains #15292
3 years ago
..
access_log.go Fix access log (#14475) 3 years ago
api.go [refactor] replace int with httpStatusCodes (#15282) 3 years ago
api_org.go Golint fixed for modules/context 8 years ago
api_test.go fix API link header (#7298) 5 years ago
auth.go [refactor] replace int with httpStatusCodes (#15282) 3 years ago
captcha.go Fix captcha (#14488) 3 years ago
context.go Use route rather than use thus reducing the number of stack frames (#15301) 3 years ago
csrf.go Add SameSite setting for cookies (#14900) 3 years ago
form.go Move macaron to chi (#14293) 3 years ago
org.go Unified link creation. (#15619) 3 years ago
pagination.go [Feature] add precise search type for Elastic Search (#12869) 3 years ago
permission.go Update docs and comments to remove macaron (#14491) 3 years ago
private.go Update docs and comments to remove macaron (#14491) 3 years ago
repo.go Turn RepoRef and RepoAssignment back into func(*Context) (#15372) 3 years ago
response.go Prevent superfluous response.WriteHeader (#15456) 3 years ago
secret.go Move macaron to chi (#14293) 3 years ago
xsrf.go Move macaron to chi (#14293) 3 years ago
xsrf_test.go Move macaron to chi (#14293) 3 years ago