mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 10:57:44 +09:00 
			
		
		
		
	Refactor AppURL usage (#30885)
Fix #30883 Fix #29591 --------- Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
This commit is contained in:
		| @@ -4,11 +4,13 @@ | ||||
| package common | ||||
|  | ||||
| import ( | ||||
| 	go_context "context" | ||||
| 	"fmt" | ||||
| 	"net/http" | ||||
| 	"strings" | ||||
|  | ||||
| 	"code.gitea.io/gitea/modules/cache" | ||||
| 	"code.gitea.io/gitea/modules/httplib" | ||||
| 	"code.gitea.io/gitea/modules/process" | ||||
| 	"code.gitea.io/gitea/modules/setting" | ||||
| 	"code.gitea.io/gitea/modules/web/middleware" | ||||
| @@ -34,6 +36,7 @@ func ProtocolMiddlewares() (handlers []any) { | ||||
| 				} | ||||
| 			}() | ||||
| 			req = req.WithContext(middleware.WithContextData(req.Context())) | ||||
| 			req = req.WithContext(go_context.WithValue(req.Context(), httplib.RequestContextKey, req)) | ||||
| 			next.ServeHTTP(resp, req) | ||||
| 		}) | ||||
| 	}) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user