Is there something in our firebase console that needs to be enabled or setup to allow CORS.
The error is similar to this:
"Access to fetch at 'https://firebase.googleapis.com/v1alpha/projects/-/apps*****' from origin 'http://localhost:4746' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled."
The app uses javascript and has installed the firebase SDK.
it pulls the firebase .js files from gstatic using version 9.22.0.
Any advice is appreciated.
Solved! Go to Solution.
I found the solution, and the finger points back at me.
I had added a package for BlazorApplicationInsights which required setup code in index.html.
Inside that setup code, CORS was being required on all calls.:
<script>
...
Hi @mobileappdev,
Welcome to the Google Cloud Community!
You should look into this Stack Overflow Post in Enabling CORS in Cloud Functions for Firebase.
You can also try to add the origin manually by following these steps:
You can also get in touch with Google Cloud Support if the above options don't work.
Let me know if it helped, thanks!
I found the solution, and the finger points back at me.
I had added a package for BlazorApplicationInsights which required setup code in index.html.
Inside that setup code, CORS was being required on all calls.:
<script>
...