cancel
Showing results for 
Search instead for 
Did you mean: 

CORS error when using integrity as crossorigin on <script>

I'm following the steps here:
https://support.visaacceptance.com/knowledgebase/Knowledgearticle/?code=KA-07551

Managed to put the "integrity" and "crossorigin" attributes in my js tag to load microform, but when i do that i got a CORS error.
Without those two attributes the JS loads fine, i'm doing anything wrong? Is the documentation is wrong?
I really want to follow the documentation and do the thinks correctly, but i'm almost ignoring those two attributes to make it work.

Thanks

 

tpinto
Member
2 REPLIES 2

I am also having similar issues, when adding integrity tag with crossorigin as anonymous, javascript library is blocked due to below error.

Subresource Integrity: The resource 'https://testflex.cybersource.com/microform/bundle/v2.0.2/flex-microform.min.js' has an integrity attribute, but the resource requires the request to be CORS enabled to check the integrity, and it is not. The resource has been blocked because the integrity cannot be enforced.

Does that mean cybersource has to enable CORS on server side ? does anyone know how to resolve this issue iof it is not cybersource issue?

 

Thanks and Regards,

smanick
New Member

We also having the same issue. Please suggest the right solution.

I think adding these two headers to response should resolve the issue:
Cross-Origin-Embedder-Policy: credentialless
Cross-Origin-Resource-Policy: cross-origin

 

 

OlegO
Member