目前我有以下 firebase.json。我想重写 https://myapp.firebaseapp.com/api 的所有请求指向https://myapp.appspot.com/api (我的应用引擎服务之一)。有点像 dispatch.yaml
appengine 使用的那个,我该怎么做?我不想使用 DNS 和像 api.xxxx.com/api 这样的子域
{
"hosting": {
"public": "dist",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "/api**",
"destination": "https://myapp.appspot.com/api"
},
{
"source": "!/api/**",
"destination": "/index.html"
}
]
}
}
最佳答案
Firebase 托管不支持重写 Google App Engine 的路径。您的 rewrite options目前是:
关于firebase - 如何使 Firebase 托管/api 重写对应用引擎服务的请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55657736/