Because it's calling out "Lightning" I think the answer is A.
Review Apex Callout (If Used):
If the callout is via an Apex controller, ensure the endpoint is added to the Remote Site Settings (Setup → Remote Site Settings).
Check for debug logs (Setup → Debug Logs) for further errors.
Verify Content Security Policy (CSP) Rules:
Ensure the external service complies with Lightning Locker Service restrictions.
You may need to configure Lightning Content Security Policy (CSP) Trusted Sites.
B is for Apex.
A is correct answer.
If you navigate to Setup -> Trusted URLs you will see the following:
"Use CSP directives to specify whether Lightning components, your CSP-secured Aura or LWR sites, third-party APIs, and WebSockets connections can load scripts, fonts, images, media, or stylesheets from each trusted URL. The main objective of CSP is to help prevent cross-site scripting (XSS) and other code injection attacks."
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Big_Fella
3 months, 4 weeks agomirniypirojok
5 months, 4 weeks agoPaul421
7 months, 2 weeks agoy1009
1 year, 2 months agojupavi86
1 year, 2 months ago