mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-03 20:47:35 +03:00
Add a 410-Gone handler for endpoints that will not be implemented
This commit is contained in:
parent
3d76144f82
commit
d68342bd97
2 changed files with 52 additions and 34 deletions
|
@ -32,6 +32,7 @@ func New(importer *scanner.Importer) *Server {
|
|||
}
|
||||
|
||||
func (a *Server) MountRouter(path string, subRouter http.Handler) {
|
||||
log.Info("Mounting API", "path", path)
|
||||
a.router.Group(func(r chi.Router) {
|
||||
r.Use(middleware.Logger)
|
||||
r.Mount(path, subRouter)
|
||||
|
@ -39,7 +40,7 @@ func (a *Server) MountRouter(path string, subRouter http.Handler) {
|
|||
}
|
||||
|
||||
func (a *Server) Run(addr string) {
|
||||
log.Info("CloudSonic server is ready to handle requests", "address", addr)
|
||||
log.Info("CloudSonic server is accepting requests", "address", addr)
|
||||
log.Error(http.ListenAndServe(addr, a.router))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue