fix routing checks
This commit is contained in:
parent
467a349b16
commit
ec4e22f570
1 changed files with 5 additions and 5 deletions
|
@ -88,11 +88,11 @@ class Server {
|
||||||
public static function authorize_activitypub_requests( $response, $handler, $request ) {
|
public static function authorize_activitypub_requests( $response, $handler, $request ) {
|
||||||
$route = $request->get_route();
|
$route = $request->get_route();
|
||||||
|
|
||||||
if ( ! str_starts_with( $route, '/activitypub' ) ) {
|
if (
|
||||||
return $response;
|
! str_starts_with( $route, '/' . ACTIVITYPUB_REST_NAMESPACE ) ||
|
||||||
}
|
str_starts_with( $route, '/' . \trailingslashit( ACTIVITYPUB_REST_NAMESPACE ) . 'webfinger' ) ||
|
||||||
|
str_starts_with( $route, '/' . \trailingslashit( ACTIVITYPUB_REST_NAMESPACE ) . 'nodeinfo' )
|
||||||
if ( get_rest_url_by_path( 'webfinger' ) !== $route ) {
|
) {
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue