Enable Gin's context fallback (#409)

This commit is contained in:
Nikolay Edigaryev
2026-02-11 18:04:15 +01:00
committed by GitHub
parent c4b7378883
commit 2b4e3b6b01
+4
View File
@@ -30,6 +30,10 @@ var ErrUnauthorized = errors.New("unauthorized")
func (controller *Controller) initAPI() *gin.Engine {
ginEngine := gin.New()
// Enable Gin's context fallback to make (*gin.Context).Done() work
// and to avoid calling the (*gin.Context).Request.Context().Done()
ginEngine.ContextWithFallback = true
var group *gin.RouterGroup
if controller.apiPrefix != "" {