Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Unified Diff: LayoutTests/http/tests/xmlhttprequest/resources/access-control-preflight-request-headers-origin.php

Issue 18595008: Prevents sending of 'orgin' in the "Access-Control-Request-Headers" when preflight requests are mad… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/xmlhttprequest/resources/access-control-preflight-request-headers-origin.php
diff --git a/LayoutTests/http/tests/xmlhttprequest/resources/access-control-preflight-request-headers-origin.php b/LayoutTests/http/tests/xmlhttprequest/resources/access-control-preflight-request-headers-origin.php
new file mode 100644
index 0000000000000000000000000000000000000000..e13eaf72ae7520249b60eb89f878cdfab47ec643
--- /dev/null
+++ b/LayoutTests/http/tests/xmlhttprequest/resources/access-control-preflight-request-headers-origin.php
@@ -0,0 +1,10 @@
+<?php
+ header("Access-Control-Allow-Origin: *");
+
+ if ($_SERVER["REQUEST_METHOD"] == "OPTIONS") {
+ if (stristr($_SERVER["HTTP_ACCESS_CONTROL_REQUEST_HEADERS"], "Origin") === false)
+ header("Access-Control-Allow-Headers: X-Custom-Header");
+ }
+ else
+ echo $_SERVER["HTTP_X_CUSTOM_HEADER"];
+?>

Powered by Google App Engine
This is Rietveld 408576698