In my react app, I am attaching a script tag to load a script resource dynamically from CDN. The host page domain is of course different than CDN domain.
My question is, in production, if my CDN response does not contain access-control-allow-origin header, and my <script> tag in DOM does not contain croossorigin, will errors generated by the CDN script resource be hidden by the browser and resulting only in Script error. message ?
And if so, will adding croossorigin to <script> tag and ensuring CDN responds with access-control-allow-origin: * header allow seeing the actual error that happen in the script (assuming I have onerror handler on the script element)
Comments
Post a Comment