CORS issue
See original GitHub issueDescription:
- A-Frame Version: 0.9.1
- Platform / Device: Chrome/74.0.3
I am facing a situation, where I do not want to add Origin: www.domain.com to request header while getting an image using a-sky and a-image.
For example, in my case -
<!-- is working -->
<img src="image_source">
<!-- CORS error -->
<img src="image_source" crossorigin="anonymous">
I tried with below solutions I found but none of them worked.
- Try to remove crossOrigin from ImageLoader
if (window.THREE) {
window.THREE.ImageLoader.prototype.crossOrigin = ''
}
- Try to set crossOrigin via FileLoader
if (window.THREE) {
window.THREE.FileLoader.prototype.setRequestHeader('crossOrigin', '')
}
- Use a-assets to load image
<script src="https://aframe.io/releases/0.9.1/aframe.min.js"></script>
<a-scene>
<a-assets>
<img id="sky" src=image_source">
</a-assets>
<a-sky src="#sky"></a-sky>
</a-scene>
Is there any way to prevent aframe to adding crossOrigin=“anonymous” in header?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:7 (3 by maintainers)
Top Results From Across the Web
CORS errors - HTTP - MDN Web Docs - Mozilla
If the CORS configuration isn't setup correctly, the browser console will present an error like "Cross-Origin Request Blocked: The Same ...
Read more >3 Ways to Fix the CORS Error — and How the Access-Control ...
Fix one: install the Allow-Control-Allow-Origin plugin. The quickest fix you can make is to install the moesif CORS extension .
Read more >What Is a CORS Error and How to Fix It (3 Ways) - Bannerbear
As a CORS error occurs when the external API server doesn't return the HTTP headers required by the CORS standard, you can add...
Read more >CORS errors and how to solve them - Topcoder
CORS is an abbreviation for Cross-Origin Response Sharing. ... Or, your API fails and shows a CORS error in the console.
Read more >A Guide to Solving Those Mystifying CORS Issues
An 'issue with CORS' occurs when the API does not reply to such request with, 'Yes, dear browser, you are allowed to do...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Updated @dmarcos . I will create a demo and with the reproducable example soon.
@jlavie The server that hosts the images has to be CORS configured. Look for Cloudfront CORS configuration. Closing this since I don’t think there’s nothing actionable on A-Frame side. We can reopen if necessary.