Firebase托管重定向到另一个子域保持查询和参数
如何将调用调用到另一个子域,将所有请求保留为使用Firebase托管的原始请求。我可以在Web应用程序级别上做到这一点,但这将导致性能问题。
例如:
https://some.app.com/Route/param?= something
&ampt; tokOthOts
https://different.app.com/route.com/route/param?= something &to /代码>
How can I redirect calls to another subdomain, keeping all the request as the original using Firebase hosting. I could do it at web application level but this will lead to performances issues.
Ex :
https://some.app.com/route/param?=something&others
to
https://different.app.com/route/param?=something&others
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我正在研究类似的事情,这是我目前作为firebase节点函数的尝试:
我无法使它起作用,当我记录了req.subdomains时,即使我对此功能指出了多个记录子域,也是空的。可能由于这些服务器设置的方式而丢失了请求对象的子域。无论子域如何,我都会恢复到简单地转发到静态主机名,但是如果有人对
req.subdomains
在firebase函数中不起作用的答案,请让我们知道!I was working on something similar, here is my current attempt as a firebase node function:
I could not get this to work, when I logged req.subdomains it was empty even though I have pointed multiple A Record subdomains to this function. Perhaps subdomain on request object is lost due to the way these servers are setup, not sure. I'll revert to simply forward to a static hostname regardless of subdomain, but if anyone has an answer to why
req.subdomains
doesn't work in firebase functions please let us know!