| 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);
|
| + }
|
| +
|
| if (m_isCORSEnabled)
|
| request.setCrossOriginAccessControl(document->securityOrigin(), m_allowCredentials);
|
|
|
|
|