We've a formula field that uses graphics from the Graphics Pack app. It works fine within our Salesforce but when we display it in our partner community, it doesn't show the image (but still shows the text).
Upon inspecting the broken image element, it looks like the issue is "Cross-Origin Read Blocking".
Cross-Origin Read Blocking (CORB) blocked cross-origin response https://lalala.my.salesforce.com/visualforce/session?url=https%3A%2F%2Flalala--c.visualforce.com%2Fresource%2F1529792561000%2FGraphicsPackNew%2Ftangodesktopproject%2F16%2Ftheme%2Fdialog-warning.png with MIME type text/html. See https://www.chromestatus.com/feature/5629709824032768 for more details.
Anyone know how to work around this?
답변 5개
Hi Lawson Teo,
Cross-Origin Resource Sharing (CORS) enables web browsers to request resources from origins other than their own (cross-origin).
In Salesforce, add the origin serving the code to a CORS whitelist using the below path:
From Setup, enter CORS in the Quick Find box, then select CORS.
Select New.
Enter an origin URL pattern.
Reference:
https://help.salesforce.com/articleView?id=extend_code_cors.htm&type=5
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks & Regards,
Sakthivel Madesh