capacitor-community / electron

Deploy your Capacitor apps to Linux, Mac, and Windows desktops, with the Electron platform! 🖥️
https://capacitor-community.github.io/electron/
MIT License
318 stars 58 forks source link

Blob url ignores CSP #215

Open p-Jimenez opened 1 year ago

p-Jimenez commented 1 year ago

Describe the bug When accessing a resource via blob protocol, capacitor-electron gets ignored on the CSP.

To Reproduce Steps to reproduce the behavior:

  1. Try to access a blob resource with blob:capacitor-electron://-/

Expected behavior No CSP errors since it's comming from the same application's schema

Screenshots image

Desktop (please complete the following information):

Additional context Ionic Capacitor app with React. Trying to import https://www.npmjs.com/package/react-media-recorder

JuliusSkrisa commented 1 year ago

I think you need to explicitly enable "blob:" protocol in 'Content-Security-Policy' string in setup.ts