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 7c4172ef71
Pass down SignedUserName down to AccessLogger context (#16605)
* Pass down SignedUserName down to AccessLogger context

Unfortunately when the AccessLogger was moved back before the contexters the
SignedUserName reporting was lost. This is due to Request.WithContext leading to a
shallow copy of the Request and the modules/context/Context being within that request.

This PR adds a new context variable of a string pointer which is set and handled
in the contexters.

Fix #16600

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

* handle nil ptr issue

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

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years ago
..
access_log.go Pass down SignedUserName down to AccessLogger context (#16605) 3 years ago
api.go Pass down SignedUserName down to AccessLogger context (#16605) 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 Pass down SignedUserName down to AccessLogger context (#16605) 3 years ago
csrf.go Redirect on bad CSRF instead of presenting bad page (#14937) 3 years ago
form.go [API] ListReleases add filter for draft and pre-releases (#16175) 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 Rename context.Query to context.Form (#16562) 3 years ago
response.go Stop calling WriteHeader in Write (#15862) 3 years ago
xsrf.go Move macaron to chi (#14293) 3 years ago
xsrf_test.go Move macaron to chi (#14293) 3 years ago