intelica-library-components 1.1.70 → 1.1.71

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.
@@ -696,10 +696,14 @@ const RefreshTokenInterceptor = (req, next) => {
696
696
  const ResponseHeadersInterceptor = (req, next) => {
697
697
  return next(req).pipe(tap(event => {
698
698
  if (event instanceof HttpResponse) {
699
- const headers = event.headers;
700
- const newToken = headers.get("TokenNew");
701
- if (newToken != null && newToken != "")
702
- setCookie("token", newToken, CookieAttributesGeneral);
699
+ const Domain = window.location.hostname.split(".").slice(-2).join(".");
700
+ const Secure = !Domain.includes("localhost");
701
+ if (!Secure) {
702
+ const headers = event.headers;
703
+ const newToken = headers.get("TokenNew");
704
+ if (newToken != null && newToken != "")
705
+ setCookie("token", newToken, CookieAttributesGeneral);
706
+ }
703
707
  }
704
708
  }));
705
709
  };