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

Unified Diff: content/test/data/service_worker/fetch_cross_origin.html

Issue 1859313002: Save-Data should not be added to CORS Access-Control-Request-Headers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed kinuko comments Created 4 years, 8 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: content/test/data/service_worker/fetch_cross_origin.html
diff --git a/content/test/data/service_worker/fetch_cross_origin.html b/content/test/data/service_worker/fetch_cross_origin.html
new file mode 100644
index 0000000000000000000000000000000000000000..e0f9ae83f0975466d0c911958227e5e426129b4b
--- /dev/null
+++ b/content/test/data/service_worker/fetch_cross_origin.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>INITIAL</title>
+<script>
+var queryString = location.search;
+
+if (queryString && queryString.charAt(0) === '?') {
+ // Fetches the URL provided in query string with a custom header.
+ fetch(queryString.substring(1), {headers: {'X-Custom-Header': 'foo'}})
+ .then(data => data.text())
+ .then(text => document.title = text)
+ .catch(() => document.title = 'FAIL');
+}
+</script>
+</head>
+</html>

Powered by Google App Engine
This is Rietveld 408576698