Reputation: 15679
If we're using Firebase hosting, how would we access someone's API without server-side scripts like php?
Upvotes: 2
Views: 509
Reputation: 11780
Firebase hosting only hosts static files. So in order to call external api, you've to do it from JavaScript using fetch/axios or something like that. However, if the api endpoint hasn't enabled CORS for your domain, your browser doesn't allow to make that request for security.
Upvotes: 2