We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07583cb commit 5ad5333Copy full SHA for 5ad5333
src/ManageTokens.php
@@ -318,8 +318,12 @@ public static function add_tokens_to_graphql_response_headers( $headers ) {
318
* @return \WP_HTTP_Response
319
* @throws \Exception
320
*/
321
- public static function add_auth_headers_to_rest_response( \WP_HTTP_Response $response, $handler, $request ) {
322
-
+ public static function add_auth_headers_to_rest_response( $response, $handler, $request ) {
+
323
+ if( ! $response instanceof \WP_HTTP_Response ) {
324
+ return $response;
325
+ }
326
327
/**
328
* If the request _is_ SSL, or GRAPHQL_DEBUG is defined, return the tokens
329
* otherwise do not return them.
0 commit comments