cross_domain.inc 511 B

1234567891011121314
  1. <?php
  2. header_remove('Access-Control-Allow-Origin');
  3. header_remove('Access-Control-Allow-Methods');
  4. header_remove('Access-Control-Allow-Headers');
  5. header_remove('Access-Control-Allow-Credentials');
  6. header('Access-Control-Allow-Origin: *');
  7. header('Access-Control-Allow-Methods: GET');
  8. header('Access-Control-Allow-Headers: User-Agent,Authorization,Content-type,X-client');
  9. header('Access-Control-Allow-Credentials: true');
  10. if($_SERVER['REQUEST_METHOD']=='OPTIONS') // Preflighted request
  11. exit(0);
  12. ?>