Changeset 48112
- Timestamp:
- 06/20/2020 11:54:32 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/class-wp-rest-server.php
r47926 r48112 244 244 */ 245 245 $this->send_header( 'X-Content-Type-Options', 'nosniff' ); 246 $this->send_header( 'Access-Control-Expose-Headers', 'X-WP-Total, X-WP-TotalPages' ); 246 $expose_headers = array( 'X-WP-Total', 'X-WP-TotalPages', 'Link' ); 247 248 /** 249 * Filters the list of response headers that are exposed to CORS requests. 250 * 251 * @since 5.5.0 252 * 253 * @param string[] $expose_headers The list of headers to expose. 254 */ 255 $expose_headers = apply_filters( 'rest_exposed_cors_headers', $expose_headers ); 256 257 $this->send_header( 'Access-Control-Expose-Headers', implode( ', ', $expose_headers ) ); 247 258 $this->send_header( 'Access-Control-Allow-Headers', 'Authorization, Content-Type' ); 248 259
Note: See TracChangeset
for help on using the changeset viewer.