Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: common/prpc/talk/buildbot/frontend/handler.go

Issue 2043423004: Make HTTP middleware easier to use (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: gaemiddleware: add middleware func for WithProd Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « appengine/tumble/tumbletest.go ('k') | common/prpc/talk/buildbot/frontend/prpc.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 }
OLDNEW
« no previous file with comments | « appengine/tumble/tumbletest.go ('k') | common/prpc/talk/buildbot/frontend/prpc.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698