【发布时间】:2020-10-03 12:41:04
【问题描述】:
我正在尝试从托管在 firebase 上的 WebApp 调用 API。
API 位于:
https://<Server ip>:4446/WebShop/WebShop.asmx/GetItemsInfo
我有以下 firebase.json 文件
{
"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
}]
}
}
Firebase 似乎忽略了重定向部分。 检查 http 调用触发基本调用“请求 URL:https://item-inspector.web.app/WebShop" 并且不将调用重定向到我的服务器,从那里提供 API。
任何关于为什么会发生这种情况的帮助将不胜感激。
谢谢
埃雷兹
【问题讨论】:
标签: firebase api redirect web-applications firebase-hosting