英文:
Apple App Site Association (AASA) file is not being updated on app-site-association.cdn-apple.com
问题
我的应用有三个不同的环境,分别命名为
- int
- sbx
- prod
以下是我网站服务器上的三个 AASA 文件链接。
- https://app.int.croissant.com/.well-known/apple-app-site-association
- https://app.sbx.croissant.com/.well-known/apple-app-site-association
- https://app.croissant.com/.well-known/apple-app-site-association
以下是相同的三个 AASA 文件在苹果的 CDN 上的链接
- https://app-site-association.cdn-apple.com/a/v1/app.int.croissant.com
- https://app-site-association.cdn-apple.com/a/v1/app.sbx.croissant.com
- https://app-site-association.cdn-apple.com/a/v1/app.croissant.com
我有两个问题。
- 我如何使苹果 CDN 失效,以便拉取我的新 AASA 文件?
- 我的新 AASA 文件是否看起来支持所有可能的路径?* 是否可以捕获任何路径,例如 /collection/123,/wallet/oauth?code=123,/sign-in
我已经进行了一般的谷歌搜索和文档阅读,但似乎找不到与苹果 CDN 相关的具体信息。
英文:
My app has three separate environments named
- int
- sbx
- prod
Here are my three AASA files on my webservers.
- https://app.int.croissant.com/.well-known/apple-app-site-association
- https://app.sbx.croissant.com/.well-known/apple-app-site-association
- https://app.croissant.com/.well-known/apple-app-site-association
Here are the same three AASA files on Apple's CDN
- https://app-site-association.cdn-apple.com/a/v1/app.int.croissant.com
- https://app-site-association.cdn-apple.com/a/v1/app.sbx.croissant.com
- https://app-site-association.cdn-apple.com/a/v1/app.croissant.com
I have two questions.
- How can I invalidate the Apple CDN so that my new AASA files are pulled in?
- Do my new AASA files look like they will support all possible paths? Does * capture any path e.g., /collection/123, /wallet/oauth?code=123, /sign-in
I've done the generic Googling and docs reading around this. I can't seem to find anything specifically related to Apple's CDN.
答案1
得分: 0
将我的AASA文件的Cache-Control标头更新为no-cache解决了我的问题。
我使用Next.js,所以这是我的next.config.js,解决了这个问题。
{
source: "/.well-known/apple-app-site-association",
headers: [
{ key: "Content-Type", value: "application/json" },
{ key: "Cache-Control", value: "no-cache" },
],
}
英文:
Updating my AASA file's Cache-Control header to no-cache fixed this for me.
I use Next.js, so here is my next.config.js that fixed this for me.
{
source: "/.well-known/apple-app-site-association",
headers: [
{ key: "Content-Type", value: "application/json" },
{ key: "Cache-Control", value: "no-cache" },
],
},
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论