Make WordPress Core

Changeset 49917


Ignore:
Timestamp:
01/02/2021 08:07:24 PM (6 years ago)
Author:
TimothyBlynJacobs
Message:

Site Health: Use a front-end URL for loopback tests.

In [49154] the async Site Health tests were changed to use the REST API instead of admin-ajax. An unintended side effect of this change was that the loopback tests which tried to ping the site's admin_url() were no longer authenticated because admin-cookies aren't provided to the REST API.

This commit adjusts the loopback test to use the front-end site_url which checks that cron will function properly. A follow-up ticket will focus on tests that will cover the file editor checks.

Props Clorith.
Fixes #52097.
See #48105.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-site-health.php

    r49904 r49917  
    25462546                }
    25472547
    2548                 $url = admin_url();
     2548                $url = site_url();
    25492549
    25502550                $r = wp_remote_get( $url, compact( 'cookies', 'headers', 'timeout', 'sslverify' ) );
Note: See TracChangeset for help on using the changeset viewer.