OLD | NEW |
---|---|
(Empty) | |
1 <?php | |
2 header("Access-Control-Allow-Origin: *"); | |
3 | |
4 if ($_SERVER["REQUEST_METHOD"] == "OPTIONS") { | |
5 if (stristr($_SERVER["HTTP_ACCESS_CONTROL_REQUEST_HEADERS"], "Origin") === false) | |
6 header("Access-Control-Allow-Headers: X-Custom-Header"); | |
7 } | |
8 else | |
9 echo $_SERVER["HTTP_X_CUSTOM_HEADER"]; | |
10 ?> | |
OLD | NEW |