Chromium Code Reviews| Index: Source/core/html/parser/PreloadRequest.cpp |
| diff --git a/Source/core/html/parser/PreloadRequest.cpp b/Source/core/html/parser/PreloadRequest.cpp |
| index 9da71dc9c1e79640e2cc11bf0ec5361c13542a12..4672710f72c5e7ff014d55f5cf7798225fc6a7fa 100644 |
| --- a/Source/core/html/parser/PreloadRequest.cpp |
| +++ b/Source/core/html/parser/PreloadRequest.cpp |
| @@ -31,6 +31,14 @@ FetchRequest PreloadRequest::resourceRequest(Document* document) |
| initiatorInfo.position = m_initiatorPosition; |
| FetchRequest request(ResourceRequest(completeURL(document)), initiatorInfo); |
| + if (m_resourceType == Resource::ImportResource) { |
| + SecurityOrigin* securityOrigin = document->contextDocument()->securityOrigin(); |
| + bool sameOrigin = securityOrigin->canRequest(request.url()); |
| + request.setCrossOriginAccessControl(securityOrigin, |
| + sameOrigin ? AllowStoredCredentials : DoNotAllowStoredCredentials, |
| + ClientDidNotRequestCredentials); |
| + } |
| + |
|
Yoav Weiss
2015/06/11 10:50:47
OK, so that corresponds to http://w3c.github.io/we
Mike West
2015/06/12 07:33:04
How does this deal with redirects? Otherwise it lo
yoichio
2015/06/16 05:13:09
CrossOriginAccessControl::handleRedirect also take
|
| if (m_isCORSEnabled) |
| request.setCrossOriginAccessControl(document->securityOrigin(), m_allowCredentials); |