Cleanup pt 1 (#4)

* Disable startup headers.

* Add banning / unbanning of specific user.
This commit is contained in:
2023-10-19 14:36:16 +01:00
committed by GitHub
parent 2be4f17ea3
commit 92359c1114
9 changed files with 223 additions and 12 deletions
+4
View File
@@ -50,9 +50,13 @@ func parseConfig() {
return strings.Split(urls, ",")
}()
c.Client.FastProxyClient = createFasthttpClient()
c.Server.EnableApi = envutil.GetBool("ENABLE_API", false)
c.Server.ApiPort = envutil.GetInt("API_PORT", 9090)
c.Api.BannedUsersFile = envutil.Getenv("BANNED_USERS_FILE", "/go/src/app/banned_users.json")
cfg = &c
enableCache() // takes close to no resources, but can be used with dynamic query cache
loadRatelimitConfig()
enableApi()
}
func main() {