By default the Angular ServiceWorker (ng add @angular/pwa
) proxies all request but not only requests listed in it's configuration file (ngsw-config.json
).
The problem is that some custom offline mechanisms rely on a native offline response (error code 0 instead of 504 [responded by ngsw
]).
My questions are:
request = request.clone({ setHeaders: { 'ngsw-bypass': 'true' } });
) but that e.g. broke mat-icon
(relying on HttpClient
) and only intercepts HttpClient. I just want my page to behave totally normal as long as no special endpoints are requestedTechnically not possible and (currently) not planned: https://github.com/angular/angular/issues/60950