Fix(API): cors middleware hoisting because it doesn't work with r.Group
This commit is contained in:
parent
8f60d61ff9
commit
e0c8aed5c7
1 changed files with 2 additions and 1 deletions
|
@ -52,9 +52,10 @@ func Start(addr string, secret string) {
|
|||
MaxAge: 300,
|
||||
})
|
||||
|
||||
r.Use(cors.Handler)
|
||||
r.Get("/", hello)
|
||||
r.Group(func(r chi.Router) {
|
||||
r.Use(cors.Handler, authentication)
|
||||
r.Use(authentication)
|
||||
|
||||
r.Get("/logs", getLogs)
|
||||
r.Get("/traffic", traffic)
|
||||
|
|
Loading…
Reference in a new issue