CORS configuration not working with FB Hosting?

107 views
Skip to first unread message

Adnan Khan

unread,
Aug 23, 2016, 7:04:56 PM8/23/16
to Firebase Google Group
Hello,

I seem to be having problems not getting my CORS header to be generated, I am basically invoking an XHR request from the hosted site (ezpzrentals.com) to a web service deployed on https://api.ezpzrentals.com, I continue to see the following error in the console... "No 'Access-Control-Allow-Origin' header is present on the requested resource." Here are the contents of my firebase.json config file, any tips, info would be greatly appreciated. Thank you in advance!

{
"hosting": {
"public": "public",
"headers": [
{
"source": "**",
"headers": [
{
"key": "Access-Control-Allow-Origin",
"value": "*"
}
]
}
]
}
}

Chris Raynor

unread,
Aug 23, 2016, 7:32:31 PM8/23/16
to Firebase Google Group
I think the CORS headers need to be on the API domain (https://api.ezpzrentals.com), not on your Firebase Hosting site in this case

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/fa36b46a-0e53-4293-b60c-63965bb3db0e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages