XMLHttpRequest cannot load https://firestore.googleapis… due to access control checks

后端 未结 2 589
滥情空心
滥情空心 2021-01-04 13:23

I\'m trying to implement firestore in my project. What I\'m doing right now is just implementing it and read some data, but I get the error in the title :

XMLHttpReq

2条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-04 13:31

    Sounds like you need to update your Firestore Security Rules. You can do this via the "Rules" tab of the Database page in the Firebase Console website.

    Docs about Firestore Rules are here: https://firebase.google.com/docs/firestore/security/get-started

    You can use this ruleset to make it accessible to anyone. I would use these rules just to make sure that you were able to fix your problem. After that, I would tweak your rules so they match the amount of security (or sensitivity) your app's data needs.

    service cloud.firestore { match /databases/{database}/documents { match /{document=**} { allow read, write: if true; } } }

提交回复
热议问题