@@ -99,9 +99,52 @@ return Promise.all([
9999 } ;
100100 } ) ;
101101 } ) ,
102- parseResponse ( '/.well-known/apple-app-site-association' ) ,
102+ // Apple App Site Association
103+ parseResponse ( '/.well-known/apple-app-site-association' , r => {
104+ return r . text ( ) . then ( text => {
105+ let result = {
106+ applinks : null ,
107+ webcredentials : null ,
108+ appclips : null
109+ } ;
110+
111+ try {
112+ let data = JSON . parse ( text ) ;
113+ result . applinks = data . applinks || null ;
114+ result . webcredentials = data . webcredentials || null ;
115+ result . appclips = data . appclips || null ;
116+ } catch ( e ) {
117+ // Failed to parse JSON, result will contain default values.
118+ }
119+
120+ return result ;
121+ } ) ;
122+ } ) ,
103123 // privacy sandbox
104- parseResponse ( '/.well-known/related-website-set.json' ) , //Related Website Set
124+ parseResponse ( '/.well-known/related-website-set.json' , r => { //Related Website Set
125+ return r . text ( ) . then ( text => {
126+ let result = {
127+ primary : null ,
128+ associatedSites : null ,
129+ serviceSites : null ,
130+ ccTLDs : null ,
131+ rationaleBySite : null
132+ } ;
133+
134+ try {
135+ let data = JSON . parse ( text ) ;
136+ result . primary = data . primary || null ;
137+ result . associatedSites = data . associatedSites || null ;
138+ result . serviceSites = data . serviceSites || null ;
139+ result . ccTLDs = data . ccTLDs || null ;
140+ result . rationaleBySite = data . rationaleBySite || null ;
141+ } catch ( e ) {
142+ // Failed to parse JSON, result will contain default values.
143+ }
144+
145+ return result ;
146+ } ) ;
147+ } ) ,
105148 parseResponse ( '/.well-known/privacy-sandbox-attestations.json' ) , //Attestation File
106149 // privacy
107150 parseResponse ( '/.well-known/gpc.json' , r => {
0 commit comments