| OLD | NEW |
| 1 // Copyright 2015 The LUCI Authors. All rights reserved. | 1 // Copyright 2015 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 package buildbot | 5 package buildbot |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "net/http" | 8 "net/http" |
| 9 | 9 |
| 10 "github.com/julienschmidt/httprouter" | |
| 11 | |
| 12 "github.com/luci/luci-go/appengine/gaemiddleware" | 10 "github.com/luci/luci-go/appengine/gaemiddleware" |
| 11 "github.com/luci/luci-go/server/router" |
| 13 ) | 12 ) |
| 14 | 13 |
| 15 func init() { | 14 func init() { |
| 16 » router := httprouter.New() | 15 » r := router.New() |
| 17 » gaemiddleware.InstallHandlers(router, gaemiddleware.BaseProd) | 16 » basemw := gaemiddleware.BaseProd() |
| 18 | 17 |
| 19 » InstallAPIRoutes(router, gaemiddleware.BaseProd) | 18 » gaemiddleware.InstallHandlers(r, basemw) |
| 20 | 19 » InstallAPIRoutes(r, basemw) |
| 21 » http.DefaultServeMux.Handle("/", router) | 20 » http.DefaultServeMux.Handle("/", r) |
| 22 } | 21 } |
| OLD | NEW |