<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Origin header is not included in CORS requests for cross-origin resources"
href="https://bugs.webkit.org/show_bug.cgi?id=155761#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Origin header is not included in CORS requests for cross-origin resources"
href="https://bugs.webkit.org/show_bug.cgi?id=155761">bug 155761</a>
from <span class="vcard"><a class="email" href="mailto:me@joshdover.com" title="Josh Dover <me@joshdover.com>"> <span class="fn">Josh Dover</span></a>
</span></b>
<pre>Anyone looking for a SAFE workaround should not be using `Access-Control-Allow-Origin: *`. What I used that worked:
- Find the CSSStyleSheet in the `tainted` state (`styleSheet.cssRules` will be null).
- Make an XHR for the stylesheet's `href`
- Add a new <style> node to the document's head with the contents of the XHR.
- Optionally, remove the original style tag
This method will be safe since you are still relying on the browser's CORS protections when you make the XHR.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>