@experteam-mx/ngx-services 20.0.0-beta.4 → 20.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4402,7 +4402,17 @@ function apiHeadersInterceptor(req, next) {
|
|
|
4402
4402
|
if (isStaticAsset$1(req.url)) {
|
|
4403
4403
|
return next(req);
|
|
4404
4404
|
}
|
|
4405
|
-
let
|
|
4405
|
+
let headers = req.headers;
|
|
4406
|
+
const noCacheHeaders = {
|
|
4407
|
+
'Cache-Control': 'no-cache, no-store, must-revalidate, max-age=0',
|
|
4408
|
+
Pragma: 'no-cache',
|
|
4409
|
+
Expires: '0',
|
|
4410
|
+
};
|
|
4411
|
+
Object.entries(noCacheHeaders).forEach(([key, value]) => {
|
|
4412
|
+
if (!headers.has(key)) {
|
|
4413
|
+
headers = headers.set(key, value);
|
|
4414
|
+
}
|
|
4415
|
+
});
|
|
4406
4416
|
if (!headers.has('Content-Type') && !(req.body instanceof FormData)) {
|
|
4407
4417
|
headers = headers.set('Content-Type', 'application/json');
|
|
4408
4418
|
}
|