diff --git a/main.go b/main.go index c6e026f..0e6bde5 100644 --- a/main.go +++ b/main.go @@ -79,7 +79,7 @@ func parseConfig() { enableCache() // takes close to no resources, but can be used with dynamic query cache loadRatelimitConfig() - enableApi() + go enableApi() prepareQueriesAndExemptions() } diff --git a/ratelimit.go b/ratelimit.go index 4df2896..f0fd25d 100644 --- a/ratelimit.go +++ b/ratelimit.go @@ -27,7 +27,7 @@ var ratelimit_intervals = map[string]time.Duration{ } func loadRatelimitConfig() error { - paths := []string{"/go/src/app/ratelimit.json", "./ratelimit.json", "./static/default-ratelimit.json"} + paths := []string{"/go/src/app/ratelimit.json", "./ratelimit.json", "./static/app/default-ratelimit.json"} for _, path := range paths { err := loadConfigFromPath(path) diff --git a/server.go b/server.go index 50d7d4e..5763711 100644 --- a/server.go +++ b/server.go @@ -16,6 +16,7 @@ import ( // StartHTTPProxy starts the HTTP and points it to the GraphQL server. func StartHTTPProxy() { + cfg.Logger.Debug("Starting the HTTP proxy", nil) server := fiber.New(fiber.Config{ DisableStartupMessage: true, AppName: fmt.Sprintf("GraphQL Monitoring Proxy - %s v%s", libpack_config.PKG_NAME, libpack_config.PKG_VERSION),