OLD | NEW |
---|---|
1 <?php | 1 <?php |
2 if (isset($_GET['Status'])) { | 2 if ($_SERVER['REQUEST_METHOD'] !== 'OPTIONS') { |
yhirano
2016/11/22 04:05:23
Sorry, I don't understand the intention of this ch
Jack Bates
2016/11/22 18:24:17
Without this, it sends a redirect response to the
| |
3 header ("HTTP/1.1 " . $_GET["Status"]); | 3 $url = $_GET['Redirect']; |
4 } else { | 4 if ($url != "noLocation") { |
5 header ("HTTP/1.1 302"); | 5 header("Location: $url"); |
6 } | 6 } |
7 $url = $_GET['Redirect']; | 7 if (isset($_GET['Status'])) { |
8 if ($url != "noLocation") { | 8 header ("HTTP/1.1 " . $_GET["Status"]); |
9 header("Location: $url"); | 9 } else { |
10 header ("HTTP/1.1 302"); | |
11 } | |
10 } | 12 } |
11 if (isset($_GET['ACAOrigin'])) { | 13 if (isset($_GET['ACAOrigin'])) { |
12 $origins = explode(',', $_GET['ACAOrigin']); | 14 $origins = explode(',', $_GET['ACAOrigin']); |
13 for ($i = 0; $i < sizeof($origins); ++$i) | 15 for ($i = 0; $i < sizeof($origins); ++$i) |
14 header("Access-Control-Allow-Origin: " . $origins[$i], false); | 16 header("Access-Control-Allow-Origin: " . $origins[$i], false); |
15 } | 17 } |
16 if (isset($_GET['ACAHeaders'])) | 18 if (isset($_GET['ACAHeaders'])) |
17 header("Access-Control-Allow-Headers: {$_GET['ACAHeaders']}"); | 19 header("Access-Control-Allow-Headers: {$_GET['ACAHeaders']}"); |
18 if (isset($_GET['ACAMethods'])) | 20 if (isset($_GET['ACAMethods'])) |
19 header("Access-Control-Allow-Methods: {$_GET['ACAMethods']}"); | 21 header("Access-Control-Allow-Methods: {$_GET['ACAMethods']}"); |
20 if (isset($_GET['ACACredentials'])) | 22 if (isset($_GET['ACACredentials'])) |
21 header("Access-Control-Allow-Credentials: {$_GET['ACACredentials']}"); | 23 header("Access-Control-Allow-Credentials: {$_GET['ACACredentials']}"); |
22 if (isset($_GET['ACEHeaders'])) | 24 if (isset($_GET['ACEHeaders'])) |
23 header("Access-Control-Expose-Headers: {$_GET['ACEHeaders']}"); | 25 header("Access-Control-Expose-Headers: {$_GET['ACEHeaders']}"); |
24 if (isset($_GET['NoRedirectTest'])) { | 26 if (isset($_GET['NoRedirectTest'])) { |
25 echo "report({jsonpResult:'noredirect'});"; | 27 echo "report({jsonpResult:'noredirect'});"; |
26 } | 28 } |
27 ?> | 29 ?> |
OLD | NEW |