refactor: moved /status endpoint to always be public route
This commit is contained in:
parent
b0b52dc432
commit
ba3690cb5d
1 changed files with 1 additions and 1 deletions
|
|
@ -116,7 +116,6 @@ func (s *Server) Serve() error {
|
||||||
|
|
||||||
// protected routes if using auth
|
// protected routes if using auth
|
||||||
r.HandleFunc("/generate", s.Generate(opts...))
|
r.HandleFunc("/generate", s.Generate(opts...))
|
||||||
r.HandleFunc("/status", s.GetStatus)
|
|
||||||
r.Post("/targets", s.createTarget)
|
r.Post("/targets", s.createTarget)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -126,6 +125,7 @@ func (s *Server) Serve() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// always available public routes go here (none at the moment)
|
// always available public routes go here (none at the moment)
|
||||||
|
router.HandleFunc("/status", s.GetStatus)
|
||||||
|
|
||||||
s.Handler = router
|
s.Handler = router
|
||||||
return s.ListenAndServe()
|
return s.ListenAndServe()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue