Ensure auth is checked after all other middleware
This commit is contained in:
parent
cd20e647a0
commit
e66435258e
1 changed files with 3 additions and 1 deletions
|
@ -36,13 +36,15 @@ func Setup(opts *cnf.Options) (err error) {
|
|||
|
||||
// Setup middleware
|
||||
|
||||
s.Use(auth()) // Setup auth
|
||||
s.Use(mw.Logs()) // Log requests
|
||||
s.Use(mw.Fail()) // Catch panics
|
||||
s.Use(mw.Gzip()) // Gzip responses
|
||||
s.Use(mw.Uniq()) // Add uniq headers
|
||||
s.Use(mw.Cors()) // Add cors headers
|
||||
|
||||
// Setup authentication
|
||||
s.Use(auth())
|
||||
|
||||
// Check body size
|
||||
|
||||
s.Use(mw.Size(&mw.SizeOpts{
|
||||
|
|
Loading…
Reference in a new issue