Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
doubler84 opened this issue Apr 14, 2021 · 1 comment

Comments

@doubler84
Copy link

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"

@FilledStacks
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants