简体   繁体   中英

Firebase content not loading on ios 10 - ionic app

Currently working on a Ionic app. Content from Firebase stop loading on iOS 10. On android still working fine. I'm using AngularFire 1.2.0 and Firebase 2.4.2. I've been looking for the new Content Security Policy because I'm getting this error repeatedly

[Error] Failed to load resource: An SSL error has occurred and a secure connection to the server cannot be made. (.lp, line 0)

So I added in my index.html the corresponding meta tag but still not working. The connection with another app on Heroku works fine. Don't know what I'm missing.

<meta http-equiv="Content-Security-Policy"
      content="default-src 'self' gap://ready file://* *;
       script-src 'self' 'unsafe-inline' 'unsafe-eval'
         127.0.0.1:*
         https://*.herokuapp.com/
         https://*.firebaseio.com/;
       style-src  'self' 'unsafe-inline'
         127.0.0.1
         https://*.herokuapp.com/
         https://*.firebaseio.com/;
        connect-src 'self' 'unsafe-inline' 'unsafe-eval'
         127.0.0.1:*
         https://*.herokuapp.com/
         https://*.firebaseio.com/">

Problem solved. I just had to add "wss://.firebaseio.com" and " https://.firebase.com/ " to my CSP connect-src rules.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM