Skip to main content
Kevin Throne ha fatto una domanda in #Security

Hi everyone, 

 

I’m working on a simple Lightning Web Component that contains a list of external reading resources. The links work normally when I copy them into Chrome, but I’m having trouble when I try to open them directly from the LWC. 

 

For example, I added a reference link for the Surah Baqarah Last 2 Ayat resource

. When I click the link from the component, the behavior is inconsistent depending on how the link is opened. 

 

I’m currently using a standard anchor element and have also tried NavigationMixin with standard__webPage. 

 

Is there a recommended Salesforce approach for opening an external HTTPS website from an LWC? Do I need to add the domain under Trusted URLs/CSP settings, or should an external website simply be opened in a new browser tab without any CSP configuration? 

 

Any example of the recommended implementation would be appreciated. 

 

#Security

0/9000