Run auth middleware just before gzip middleware
This commit is contained in:
parent
33ab1efb08
commit
1ee95333fb
1 changed files with 4 additions and 4 deletions
|
@ -47,10 +47,6 @@ func Setup(opts *cnf.Options) (err error) {
|
||||||
|
|
||||||
s.Use(tracer())
|
s.Use(tracer())
|
||||||
|
|
||||||
// Setup authentication
|
|
||||||
|
|
||||||
s.Use(auth())
|
|
||||||
|
|
||||||
// Add cors headers
|
// Add cors headers
|
||||||
|
|
||||||
s.Use(mw.Cors(&mw.CorsOpts{
|
s.Use(mw.Cors(&mw.CorsOpts{
|
||||||
|
@ -81,6 +77,10 @@ func Setup(opts *cnf.Options) (err error) {
|
||||||
AllowedLength: 1 << 20, // 1mb
|
AllowedLength: 1 << 20, // 1mb
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
// Setup authentication
|
||||||
|
|
||||||
|
s.Use(auth())
|
||||||
|
|
||||||
// Compress responses
|
// Compress responses
|
||||||
|
|
||||||
s.Use(mw.Gzip())
|
s.Use(mw.Gzip())
|
||||||
|
|
Loading…
Reference in a new issue