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

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

Issue 1196423003: Improve console log message for CORS failure (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix Created 4 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: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
index 6ba68590afb945fbb8ceef7e0a8279a615ede9bd..e31018cc8d8f4776e0afcfba786ac6152a05a333 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
@@ -260,7 +260,7 @@ bool ResourceFetcher::canAccessResponse(Resource* resource, const ResourceRespon
resource->setCORSFailed();
if (!forPreload) {
String resourceType = Resource::resourceTypeToString(resource->getType(), resource->options().initiatorInfo);
- context().addConsoleMessage(resourceType + " from origin '" + SecurityOrigin::create(response.url())->toString() + "' has been blocked from loading by Cross-Origin Resource Sharing policy: " + errorDescription);
+ context().addConsoleMessage("Access to " + resourceType + " at '" + response.url().getString() + "' from origin '" + SecurityOrigin::create(response.url())->toString() + "' has been blocked by CORS policy: " + errorDescription);
}
return false;
}

Powered by Google App Engine
This is Rietveld 408576698