fix issue with API endpoint of WordPress.com
This commit is contained in:
parent
38cd0b973b
commit
3834288922
1 changed files with 1 additions and 1 deletions
|
@ -156,7 +156,7 @@ class Signature {
|
||||||
public static function verify_http_signature( $request ) {
|
public static function verify_http_signature( $request ) {
|
||||||
if ( is_object( $request ) ) { // REST Request object
|
if ( is_object( $request ) ) { // REST Request object
|
||||||
// check if route starts with "index.php"
|
// check if route starts with "index.php"
|
||||||
if ( str_starts_with( $request->get_route(), '/index.php' ) ) {
|
if ( str_starts_with( $request->get_route(), '/index.php' ) || ! rest_get_url_prefix() ) {
|
||||||
$route = $request->get_route();
|
$route = $request->get_route();
|
||||||
} else {
|
} else {
|
||||||
$route = '/' . rest_get_url_prefix() . '/' . ltrim( $request->get_route(), '/' );
|
$route = '/' . rest_get_url_prefix() . '/' . ltrim( $request->get_route(), '/' );
|
||||||
|
|
Loading…
Reference in a new issue