firebase-backend icon indicating copy to clipboard operation
firebase-backend copied to clipboard

Firebase hosting rewrite to function doesn't work with firebase-backend

Open doubler84 opened this issue 3 years ago • 1 comments

I try to call the rest api from a single page application. I use the features of firebase hosting rewriting ("https://firebase.google.com/docs/hosting/full-config#rewrite-functions"), it allow to call a firebase function without CORS errors. When i try to call the firebase function deployed with firebase-backend i have this response: Cannot POST /addUserRole/addUserRole If i try to call the firebase function with POSTMAN it works.

You can check documentation about firebase hosting rewrite here: "https://firebase.google.com/docs/hosting/full-config#rewrite-functions"

doubler84 avatar Apr 14 '21 16:04 doubler84

Thanks for the resources. We're adding functionality for CORS into the project now. Just waiting on the readme doc to be updated before we push the changes.

I'll see if we can make use of the above to make it easier.

FilledStacks avatar Apr 20 '21 08:04 FilledStacks