From 1ee95333fbf66e59267c9fa784e74cddbfe622ae Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Thu, 16 Nov 2017 20:50:52 +0000 Subject: [PATCH] Run auth middleware just before gzip middleware --- web/web.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/web.go b/web/web.go index 4aee3f84..a2d835e5 100644 --- a/web/web.go +++ b/web/web.go @@ -47,10 +47,6 @@ func Setup(opts *cnf.Options) (err error) { s.Use(tracer()) - // Setup authentication - - s.Use(auth()) - // Add cors headers s.Use(mw.Cors(&mw.CorsOpts{ @@ -81,6 +77,10 @@ func Setup(opts *cnf.Options) (err error) { AllowedLength: 1 << 20, // 1mb })) + // Setup authentication + + s.Use(auth()) + // Compress responses s.Use(mw.Gzip())