CreateServer uses the (*Server).Use function instead of the internal from the router.
Dieser Commit ist enthalten in:
Ursprung
dcbfbf9ea8
Commit
3810b30d5d
2
http.go
2
http.go
|
@ -60,7 +60,7 @@ func CreateServer(config *toml.Tree) *Server {
|
|||
router: gin.New(),
|
||||
authhf: &auth.AnonAccountHandler{},
|
||||
}
|
||||
server.router.Use(func(c *gin.Context) {
|
||||
server.Use(func(c *gin.Context) {
|
||||
c.Set("account", server.authhf.Account(c))
|
||||
})
|
||||
if err := config.Unmarshal(server.conf); err != nil {
|
||||
|
|
Laden…
In neuem Issue referenzieren