Add read only mode to block all the queries with mutations.

This commit is contained in:
2023-10-10 19:26:36 +01:00
parent 917ee1a431
commit 7de1cf7cc7
4 changed files with 18 additions and 1 deletions
+1
View File
@@ -31,6 +31,7 @@ func parseConfig() {
c.Client.GQLClient = graphql.NewConnection()
c.Client.GQLClient.SetEndpoint(c.Server.HostGraphQL)
c.Server.AccessLog = envutil.GetBool("ENABLE_ACCESS_LOG", false)
c.Server.ReadOnlyMode = envutil.GetBool("READ_ONLY_MODE", false)
cfg = &c
enableCache() // takes close to no resources, but can be used with dynamic query cache
loadRatelimitConfig()