Make WordPress Core


Ignore:
Timestamp:
10/12/2023 12:29:18 PM (15 months ago)
Author:
jorbin
Message:

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

Props tykoted, xknown, ehtis, timothyblynjacobs, peterwilsoncc, rmccue, jorbin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api.php

    r56819 r56834  
    10911091
    10921092    if ( ! $result ) {
     1093        add_filter( 'rest_send_nocache_headers', '__return_true', 20 );
    10931094        return new WP_Error( 'rest_cookie_invalid_nonce', __( 'Cookie check failed' ), array( 'status' => 403 ) );
    10941095    }
Note: See TracChangeset for help on using the changeset viewer.