| Index: third_party/WebKit/LayoutTests/http/tests/misc/resources/cors-preflight.php
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/misc/resources/cors-preflight.php b/third_party/WebKit/LayoutTests/http/tests/misc/resources/cors-preflight.php
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..009aa1a8ff3ba38e19bd2d2b7d7cb6abf499b6f7
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/misc/resources/cors-preflight.php
|
| @@ -0,0 +1,21 @@
|
| +<?php
|
| +header("Access-Control-Allow-Origin: *");
|
| +header("Access-Control-Max-Age: 0");
|
| +header("Timing-Allow-Origin: *");
|
| +
|
| +if ($_SERVER["REQUEST_METHOD"] == "OPTIONS") {
|
| + header("Access-Control-Allow-Headers: X-Require-Preflight");
|
| + ob_start();
|
| +}
|
| +?>
|
| +<!DOCTYPE html>
|
| +<title>CORS preflight test</title>
|
| +If this script is accessed with the header X-Require-Preflight then the
|
| +browser will send a preflight request. Otherwise it won't.
|
| +
|
| +<?php
|
| +if ($_SERVER["REQUEST_METHOD"] == "OPTIONS") {
|
| + # Discard the body.
|
| + ob_end_clean();
|
| +}
|
| +?>
|
|
|