- Timestamp:
- 06/08/2023 02:34:42 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/themes/theme-directory/1.0/index.php
r6462 r12632 18 18 function api_send_json( $data ) { 19 19 // Allow cross-domain calls from *.wordpress.org 20 if ( isset( $_SERVER['HTTP_ORIGIN'] ) && preg_match( '!^https?:// [^.]+\.wordpress\.org/!i', $_SERVER['HTTP_ORIGIN'] ) ) {20 if ( isset( $_SERVER['HTTP_ORIGIN'] ) && preg_match( '!^https?://([^.]+\.)?wordpress\.org/?$!i', $_SERVER['HTTP_ORIGIN'] ) ) { 21 21 header( 'Access-Control-Allow-Origin: ' . $_SERVER['HTTP_ORIGIN'] ); 22 header( 'Access-Control-Allow-Credentials: true' ); // Allow cookies to be used. 22 23 } 23 24
Note: See TracChangeset
for help on using the changeset viewer.