mirror of
https://github.com/m1k1o/neko-rooms.git
synced 2026-11-02 22:51:34 -06:00
add proxy (WIP).
This commit is contained in:
@@ -24,7 +24,7 @@ type ServerManagerCtx struct {
|
||||
config *config.Server
|
||||
}
|
||||
|
||||
func New(ApiManager types.ApiManager, pathPrefix string, config *config.Server) *ServerManagerCtx {
|
||||
func New(ApiManager types.ApiManager, pathPrefix string, config *config.Server, handler http.Handler) *ServerManagerCtx {
|
||||
logger := log.With().Str("module", "server").Logger()
|
||||
|
||||
router := chi.NewRouter()
|
||||
@@ -73,6 +73,8 @@ func New(ApiManager types.ApiManager, pathPrefix string, config *config.Server)
|
||||
logger.Info().Msgf("with pprof endpoint at %s", pprofPath)
|
||||
}
|
||||
|
||||
router.Handle("/*", handler)
|
||||
|
||||
// we could use custom 404
|
||||
router.NotFound(http.NotFound)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user