Skip to content

Commit

Permalink
add Access-Constrol-Allow-Headers for CROS
Browse files Browse the repository at this point in the history
  • Loading branch information
colorhook committed Jul 17, 2011
1 parent 7fb3571 commit 0259580
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions access-control/resouce.php
@@ -1,13 +1,14 @@
<?php
/*
* Copyright (c) 2010 the original author or authors
* @author colorhook@gmail.com
*
* Permission is hereby granted to use, modify, and distribute this file
* in accordance with the terms of the license agreement accompanying it.
*/
header("Access-Control-Allow-Origin: http://www.a.com");
//header("Access-Control-Allow-Method: POST");
//header("Access-Control-Allow-Headers: X-PINGOTHER");
echo "That's right! You can make crossdomain asynchronous HTTP request by specify the HTTP response header: Access-Control-Allow-Origin";
<?php
/*
* Copyright (c) 2010 the original author or authors
* @author colorhook@gmail.com
*
* Permission is hereby granted to use, modify, and distribute this file
* in accordance with the terms of the license agreement accompanying it.
*/
header("Access-Control-Allow-Headers: x-requested-with");
header("Access-Control-Allow-Origin: http://www.a.com");
//header("Access-Control-Allow-Method: POST");
//header("Access-Control-Allow-Headers: X-PINGOTHER");
echo "That's right! You can make crossdomain asynchronous HTTP request by specify the HTTP response header: Access-Control-Allow-Origin";
?>

0 comments on commit 0259580

Please sign in to comment.