Index: third_party/WebKit/LayoutTests/external/wpt/fetch/api/resources/method.py |
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fetch/api/resources/method.py b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/resources/method.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..db234f9d123fceed16081b6afada3bdda071d3a8 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/resources/method.py |
@@ -0,0 +1,11 @@ |
+def main(request, response): |
+ headers = [] |
+ if "cors" in request.GET: |
+ headers.append(("Access-Control-Allow-Origin", "*")) |
+ headers.append(("Access-Control-Allow-Credentials", "true")) |
+ headers.append(("Access-Control-Allow-Methods", "GET, POST, PUT, FOO")) |
+ headers.append(("Access-Control-Allow-Headers", "x-test, x-foo")) |
+ headers.append(("Access-Control-Expose-Headers", "x-request-method")) |
+ |
+ headers.append(("x-request-method", request.method)) |
+ return headers, request.body |