diff --git a/lib/namespace.php b/lib/namespace.php index e4d9f18..ae9429b 100644 --- a/lib/namespace.php +++ b/lib/namespace.php @@ -44,7 +44,8 @@ function discover_api_root( $uri, $legacy = false ) { $response = Requests::head( $uri ); $response->throw_for_status(); - $links = $response->headers->getValues( 'Link' ); + $header_value = $response->headers->getValues( 'Link' ); + $links = explode( ',', $header_value[0] ); // Find the correct link by relation foreach ( $links as $link ) {