mirror of
https://github.com/lukaszraczylo/graphql-monitoring-proxy.git
synced 2026-06-05 23:03:48 +00:00
Fix retrospection query blocking.
This commit is contained in:
@@ -94,6 +94,10 @@ func parseGraphQLQuery(c *fiber.Ctx) (operationType, operationName string, cache
|
||||
}
|
||||
}
|
||||
if cfg.Security.BlockIntrospection {
|
||||
for _, retrospection_query := range retrospection_queries {
|
||||
retrospectionQuerySet[strings.ToLower(retrospection_query)] = struct{}{}
|
||||
}
|
||||
|
||||
for _, s := range oper.SelectionSet.Selections {
|
||||
for _, s2 := range s.GetSelectionSet().Selections {
|
||||
if _, exists := retrospectionQuerySet[strings.ToLower(s2.(*ast.Field).Name.Value)]; exists {
|
||||
|
||||
Reference in New Issue
Block a user