From 73342267e87661734f6c7171860b6d4702ed83b6 Mon Sep 17 00:00:00 2001 From: Christian Fritsch Date: Fri, 29 Nov 2024 14:16:16 +0100 Subject: [PATCH] Update disable-introspection.mdx (#6040) Co-authored-by: Arda TANRIKULU --- .../gateway/other-features/security/disable-introspection.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/web/docs/src/pages/docs/gateway/other-features/security/disable-introspection.mdx b/packages/web/docs/src/pages/docs/gateway/other-features/security/disable-introspection.mdx index 20150eb4b..a06ddb33e 100644 --- a/packages/web/docs/src/pages/docs/gateway/other-features/security/disable-introspection.mdx +++ b/packages/web/docs/src/pages/docs/gateway/other-features/security/disable-introspection.mdx @@ -38,7 +38,9 @@ import { defineConfig } from '@graphql-hive/gateway' export const gatewayConfig = defineConfig({ disableIntrospection: { - isDisabled: request => request.headers.get('x-allow-introspection') !== 'secret-access-key' + disableIf: ({ context }) => { + return context.request.headers.get('x-allow-introspection') !== 'secret-access-key' + } } }) ```