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

Unified Diff: third_party/WebKit/Source/core/fetch/FetchUtils.cpp

Issue 1860693004: Allow custom inspector header for CORS preflight. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: third_party/WebKit/Source/core/fetch/FetchUtils.cpp
diff --git a/third_party/WebKit/Source/core/fetch/FetchUtils.cpp b/third_party/WebKit/Source/core/fetch/FetchUtils.cpp
index 658f3ad2682d4f8ae986e2876a441a095fb0e5f2..1cec7b17a5fc140f6f09d4109cfc7fdcddc31a61 100644
--- a/third_party/WebKit/Source/core/fetch/FetchUtils.cpp
+++ b/third_party/WebKit/Source/core/fetch/FetchUtils.cpp
@@ -4,6 +4,7 @@
#include "core/fetch/FetchUtils.h"
+#include "core/inspector/InspectorInstrumentation.h"
#include "platform/network/HTTPHeaderMap.h"
#include "platform/network/HTTPParsers.h"
#include "wtf/HashSet.h"
@@ -92,10 +93,13 @@ bool FetchUtils::isSimpleHeader(const AtomicString& name, const AtomicString& va
// `text/plain`."
// Treat 'Save-Data' as a simple header, since it is added by Chrome when
// Data Saver feature is enabled.
+ // Treat inspector header as a simple header, since it is added by blink when
+ // inspector is open.
if (equalIgnoringCase(name, "accept")
|| equalIgnoringCase(name, "accept-language")
|| equalIgnoringCase(name, "content-language")
+ || equalIgnoringCase(name, InspectorInstrumentation::kInspectorEmulateNetworkConditionsClientId)
|| equalIgnoringCase(name, "save-data"))
return true;

Powered by Google App Engine
This is Rietveld 408576698