ng service-worker caches data only for the time specified in the Cache-Control response header: public, max-age = 60, s-maxage = 60. After 60 seconds in offline mode, the response 504 Gateway Timeout (from ServiceWorker) comes to the request.
{
"$schema": "./node_modules/@angular/service-worker/config/schema.json",
"index": "/index.html",
"assetGroups": [
{
"name": "app",
"installMode": "prefetch",
"resources": {
"files": [
"/favicon.ico",
"/index.html",
"/manifest.webmanifest",
"/*.css",
"/*.js"
]
}
},
{
"name": "assets",
"installMode": "lazy",
"updateMode": "prefetch",
"resources": {
"files": [
"/assets/**",
"/app/app.component.ts",
"/*.(pdf|odt|eot|svg|cur|jpg|png|webp|gif|otf|ttf|woff|woff2|ani)"
]
}
}
],
"dataGroups": [
{
"name": "github-api",
"urls": ["**//api.github.com/**"],
"cacheConfig": {
"strategy": "performance",
"maxSize": "100",
"maxAge": "7d"
}
}
]
}
What could be the problem?