I am trying to call an API from a WebApp hosted on firebase.
The API is at:
https://<Server ip>:4446/WebShop/WebShop.asmx/GetItemsInfo
I have the following firebase.json file
{
"hosting": {
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
],
"redirects": [{
"source": "/WebShop/:path*",
"destination":"https://webapp.all4shop.co.il:4446/:path",
"type": 302
}]
}
}
It seems that firebase in ignoring the redirect section. Inspecting the http call fire base calls "Request URL: https://item-inspector.web.app/WebShop" and not redirecting the call to my server, where the API is served from.
Any help on why that is happening will be appreciated.
Thanks
Erez
Found out that this is a limitation built into Firebase.
To use redirect you have to upgrade your fee "Spark" Firebase plan one level up to a "Blaze" Pay As You Go plan.