Make WordPress Core


Ignore:
Timestamp:
10/12/2023 01:13:02 PM (8 months ago)
Author:
audrasjb
Message:

REST API: Ensure no-cache headers are sent when methods are ovverriden.

Props tykoted, xknown, ehtis, timothyblynjacobs, peterwilsoncc, rmccue, jorbin.
Merges [56834] to the 6.3 branch.

Location:
branches/6.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.3

  • branches/6.3/src/wp-includes/rest-api.php

    r56192 r56841  
    10851085
    10861086    if ( ! $result ) {
     1087        add_filter( 'rest_send_nocache_headers', '__return_true', 20 );
    10871088        return new WP_Error( 'rest_cookie_invalid_nonce', __( 'Cookie check failed' ), array( 'status' => 403 ) );
    10881089    }
Note: See TracChangeset for help on using the changeset viewer.