OLD | NEW |
1 <?php | 1 <?php |
2 if (strtolower($_GET["cors"]) != "false") { | 2 if (strtolower($_GET["cors"]) != "false") { |
3 header("Access-Control-Allow-Origin: http://127.0.0.1:8000"); | 3 header("Access-Control-Allow-Origin: http://127.0.0.1:8000"); |
4 } | 4 } |
| 5 if (strtolower($_GET["credentials"]) == "true") { |
| 6 header("Access-Control-ALlow-Credentials: true"); |
| 7 } |
5 header("Content-Type: application/javascript"); | 8 header("Content-Type: application/javascript"); |
6 if (strtolower($_GET["fail"]) == "true") | 9 $value = $_GET['value']; |
| 10 if ($value) |
| 11 echo "result = \"" . $value . "\";"; |
| 12 else if (strtolower($_GET["fail"]) == "true") |
7 echo "throw({toString: function(){ return 'SomeError' }});"; | 13 echo "throw({toString: function(){ return 'SomeError' }});"; |
8 else | 14 else |
9 echo "alert('script ran.');"; | 15 echo "alert('script ran.');"; |
10 ?> | 16 ?> |
OLD | NEW |