rest_allowed_cors_headers

rest_allowed_cors_headers

Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.5.2

apply_filters('rest_allowed_cors_headers') is found 1 times:

  • /wp-includes/rest-api/class-wp-rest-server.php line 432
    		 *
    		 * @param string[]        $allow_headers The list of request headers to allow.
    		 * @param WP_REST_Request $request       The request in context.
    		 */
    		$allow_headers = apply_filters( 'rest_allowed_cors_headers', $allow_headers, $request );
    
    		$this->send_header( 'Access-Control-Allow-Headers', implode( ', ', $allow_headers ) );
    
    		$result = $this->check_authentication();
    
    		if ( ! is_wp_error( $result ) ) {
    

See this hook used in plugins: