Enable Gin's context fallback (#409)
This commit is contained in:
parent
c4b7378883
commit
2b4e3b6b01
|
|
@ -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 != "" {
|
||||
|
|
|
|||
Loading…
Reference in New Issue