@experteam-mx/ngx-services 20.0.0-beta.3 → 20.0.0-beta.4

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.
@@ -4386,6 +4386,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
4386
4386
  args: ['env']
4387
4387
  }] }] });
4388
4388
 
4389
+ function isStaticAsset$1(url) {
4390
+ return url.startsWith('assets/') || url.includes('/i18n/');
4391
+ }
4389
4392
  /**
4390
4393
  * Intercepts an outgoing HTTP request and modifies its headers to include default values
4391
4394
  * for Cache-Control, Expires, Pragma, Content-Type, Accept, and Accept-Language if they
@@ -4396,6 +4399,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
4396
4399
  * @return {Observable<HttpEvent<unknown>>} An observable of the HTTP event resulting from the processed request.
4397
4400
  */
4398
4401
  function apiHeadersInterceptor(req, next) {
4402
+ if (isStaticAsset$1(req.url)) {
4403
+ return next(req);
4404
+ }
4399
4405
  let { headers } = req;
4400
4406
  if (!headers.has('Content-Type') && !(req.body instanceof FormData)) {
4401
4407
  headers = headers.set('Content-Type', 'application/json');
@@ -4410,6 +4416,7 @@ function apiHeadersInterceptor(req, next) {
4410
4416
  return next(req);
4411
4417
  }
4412
4418
 
4419
+ const isStaticAsset = (url) => url.startsWith('assets/') || url.includes('/i18n/');
4413
4420
  /**
4414
4421
  * HTTP interceptor that injects the external operations API key into outbound requests.
4415
4422
  *
@@ -4443,6 +4450,9 @@ function apiHeadersInterceptor(req, next) {
4443
4450
  * @see HttpHandlerFn
4444
4451
  */
4445
4452
  function apiKeyInterceptor(request, next) {
4453
+ if (isStaticAsset(request.url)) {
4454
+ return next(request);
4455
+ }
4446
4456
  const { apiExternalOperationsKey } = inject(ENVIRONMENT_TOKEN);
4447
4457
  if (!apiExternalOperationsKey)
4448
4458
  return next(request);