【问题标题】:Does Firebase include domain name while caching content from functions?Firebase 在缓存函数内容时是否包含域名?
【发布时间】:2021-07-11 18:03:12
【问题描述】:

我在函数中使用 request.hostname 为相同的 url.pathname 提供不同的内容。如果我设置Cache-Control缓存CDN中的内容,是通过url.pathname缓存还是request.hostname+url.pathname缓存?即,由于缓存,它会在不同域中提供相同的内容吗?

【问题讨论】:

    标签: firebase google-cloud-functions firebase-hosting


    【解决方案1】:

    缓存特定于完整的 URL,而不仅仅是路径。

    【讨论】:

    • 谢谢!在这种情况下,如果我使用 request.hostname 为不同域名下的同一路径提供不同的内容,您是否发现任何问题?
    猜你喜欢
    • 2021-12-10
    • 2016-07-14
    • 1970-01-01
    • 2016-11-20
    • 2015-05-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-26
    相关资源
    最近更新 更多