| Index: appengine/logdog/coordinator/config/middleware.go
|
| diff --git a/appengine/logdog/coordinator/config/middleware.go b/appengine/logdog/coordinator/config/middleware.go
|
| index bef79ceb81eb25e0a01bd82e23f4f04587b2c900..fd4114db09c2835568765e6c67ec72e6b20b89d7 100644
|
| --- a/appengine/logdog/coordinator/config/middleware.go
|
| +++ b/appengine/logdog/coordinator/config/middleware.go
|
| @@ -7,22 +7,18 @@ package config
|
| import (
|
| "net/http"
|
|
|
| - "github.com/julienschmidt/httprouter"
|
| log "github.com/luci/luci-go/common/logging"
|
| - "github.com/luci/luci-go/server/middleware"
|
| - "golang.org/x/net/context"
|
| + "github.com/luci/luci-go/server/router"
|
| )
|
|
|
| // WithConfig is a middleware.Handler that installs the LogDog Coordinator
|
| // configuration into the Context.
|
| -func WithConfig(h middleware.Handler) middleware.Handler {
|
| - return func(c context.Context, rw http.ResponseWriter, r *http.Request, params httprouter.Params) {
|
| - if err := UseConfig(&c); err != nil {
|
| - log.WithError(err).Errorf(c, "Failed to install service configuration.")
|
| -
|
| - rw.WriteHeader(http.StatusInternalServerError)
|
| - return
|
| +func WithConfig() router.Handler {
|
| + return func(c *router.Context) {
|
| + if err := UseConfig(&c.Context); err != nil {
|
| + log.WithError(err).Errorf(c.Context, "Failed to install service configuration.")
|
| + c.Writer.WriteHeader(http.StatusInternalServerError)
|
| + c.Abort()
|
| }
|
| - h(c, rw, r, params)
|
| }
|
| }
|
|
|