From 3b1d4f1c53e5b90f7e507e2af4e9dad4f63bdaca Mon Sep 17 00:00:00 2001 From: Esa-Matti Suuronen Date: Mon, 16 Dec 2019 15:10:38 +0200 Subject: [PATCH] Update is_graphql_request to match with upstream one --- src/Loader.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Loader.php b/src/Loader.php index 1ecb78e..071888f 100644 --- a/src/Loader.php +++ b/src/Loader.php @@ -115,8 +115,7 @@ function is_graphql_request() if ( isset( $_SERVER['HTTP_HOST'] ) && isset( $_SERVER['REQUEST_URI'] ) ) { $haystack = wp_unslash( $_SERVER['HTTP_HOST'] ) . wp_unslash( $_SERVER['REQUEST_URI'] ); - $needle = \home_url( \WPGraphQL\Router::$route ); - + $needle = site_url( self::$route ); // Strip protocol. $haystack = preg_replace( '#^(http(s)?://)#', '', $haystack ); $needle = preg_replace( '#^(http(s)?://)#', '', $needle );