I am not able to cache my master data api via angular service worker most of the examples show the url in dataGroup to be on same domain and hence only "/catalog" works but my api is hosted on another domain
lets say its available at http://x.com/api/catalog
following is ngsw-config.json
{
"index": "/index.html",
"assetGroups": [{
"name": "app",
"installMode": "prefetch",
"resources": {
"files": [
"/favicon.ico",
"/index.html"
],
"versionedFiles": [
"/*.bundle.css",
"/*.bundle.js",
"/*.chunk.js"
]
}
}, {
"name": "assets",
"installMode": "lazy",
"updateMode": "prefetch",
"resources": {
"files": [
"/assets/**"
],
"urls": [
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
]
}
}],
"dataGroups": [{
"name": "xyz",
"urls": ["http://x.com/api/catalog"],
"cacheConfig": {
"strategy": "freshness",
"maxSize": 15,
"maxAge": "1h",
"timeout": "5s"
}
}]
}