aboutsummaryrefslogtreecommitdiffstats
path: root/golang/gen
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-05-10 00:12:23 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-05-10 00:12:23 -0700
commit6235211860b5b3794dfe9e64bc33856dfad21897 (patch)
tree6fd7f6e79bf2baac4395c88e9a4f17ec3c72b106 /golang/gen
parentc4a7f51bbf6e157fbf32ef93886b935ea11fa0e2 (diff)
downloadfatcat-6235211860b5b3794dfe9e64bc33856dfad21897.tar.gz
fatcat-6235211860b5b3794dfe9e64bc33856dfad21897.zip
cleanups
Diffstat (limited to 'golang/gen')
-rw-r--r--golang/gen/restapi/configure_fatcat.go25
1 files changed, 2 insertions, 23 deletions
diff --git a/golang/gen/restapi/configure_fatcat.go b/golang/gen/restapi/configure_fatcat.go
index 2ec7e366..d4923b64 100644
--- a/golang/gen/restapi/configure_fatcat.go
+++ b/golang/gen/restapi/configure_fatcat.go
@@ -1,6 +1,6 @@
// This file is safe to edit. Once it exists it will not be overwritten
-// XXX: this file isn't actually used
+// NB: this file isn't actually used
package restapi
@@ -13,10 +13,6 @@ import (
runtime "github.com/go-openapi/runtime"
middleware "github.com/go-openapi/runtime/middleware"
graceful "github.com/tylerb/graceful"
- "github.com/carbocation/interpose"
- "github.com/carbocation/interpose/adaptors"
- //"github.com/getsentry/raven-go"
- "github.com/meatballhat/negroni-logrus"
"git.archive.org/bnewbold/fatcat/golang/gen/restapi/operations"
)
@@ -77,22 +73,5 @@ func setupMiddlewares(handler http.Handler) http.Handler {
// The middleware configuration happens before anything, this middleware also applies to serving the swagger.json document.
// So this is a good place to plug in a panic handling middleware, logging and metrics
func setupGlobalMiddleware(handler http.Handler) http.Handler {
-
- middle := interpose.New()
-
- // sentry and upstream
- //middle.UseHandler(sentry.Recovery(raven.DefaultClient, false))
-
- // logging
- negroniMiddleware := negronilogrus.NewMiddleware()
- middle.Use(adaptors.FromNegroni(negroniMiddleware))
-
- // add clacks
- middle.UseHandler(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
- rw.Header().Set("X-Clacks-Overhead:", "GNU Aaron Swartz, John Perry Barlow")
- }))
-
- middle.UseHandler(handler)
-
- return middle
+ return handler
}