13
Views
2
Comments
Effect of Content Security Policy on Cordova plugins

We have recently switched on CSP on an environment and are not able to load a Cordova plugin anymore. This plugin loads an external SDK.

I've looked at the CSP documentation, but it's not entirely clear for me if I need to add anything to allow custom Cordova plugins. Does anyone have experience with it?

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Hi Remco,

You can inspect the CSP errors you get, the URL's mentioned are an indication of URLs maybe access through the external SDK that you need to add to your CSP configuration.

If this doesn't help you, then may I suggest to share more details, as your question is very generic.

  • Which Cordova Plugin?
  • What errors do you get?

Regards,

Daniel

2021-02-16 20-34-58
Remco Snijders
 
MVP

The plugin was a bit difficult to disclose due to the client's policy. However, I did find out that the CSP did not cause the issue. Therefore, there seems to be no need to adjust (external SDK) plugin implementation when CSP is turned on.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.