@smartbit4all/ng-client 1.1.26 → 1.1.28

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.
@@ -841,7 +841,7 @@ class SmartSessionService {
841
841
  }
842
842
  }
843
843
  finally {
844
- this.initializeRunning.next();
844
+ this.initializeRunning.complete();
845
845
  this.initializeRunning = undefined;
846
846
  }
847
847
  }
@@ -2245,6 +2245,7 @@ class SmartViewContextService {
2245
2245
  }
2246
2246
  finally {
2247
2247
  this.initializeRunning.next(this.viewContext);
2248
+ this.initializeRunning.complete();
2248
2249
  this.initializeRunning = undefined;
2249
2250
  }
2250
2251
  }
@@ -3107,21 +3108,24 @@ class SmartHeaderMaintainerInterceptor {
3107
3108
  this.session = session;
3108
3109
  }
3109
3110
  intercept(request, next) {
3110
- const hasHeaders = this.session.headerParams && this.session.headerParams.length;
3111
+ // new request data
3112
+ let url = request.urlWithParams.replace('http://localhost', this.session.getBasePath());
3111
3113
  let headers = {};
3114
+ // copy current headers
3115
+ request.headers.keys().map((key) => {
3116
+ let value = request.headers.getAll(key);
3117
+ if (value) {
3118
+ headers[key] = value;
3119
+ }
3120
+ });
3121
+ // add own headers
3122
+ const hasHeaders = this.session.headerParams && this.session.headerParams.length;
3112
3123
  if (hasHeaders) {
3113
3124
  this.session.headerParams.map((headerParam) => {
3114
3125
  headers[headerParam.headerName] = headerParam.value;
3115
3126
  });
3116
3127
  }
3117
- let url = request.urlWithParams.replace("http://localhost", this.session.getBasePath());
3118
- // TODO fix me
3119
- if (request.urlWithParams.includes("/kerb/sso")) {
3120
- request = request.clone({
3121
- url: url,
3122
- });
3123
- return next.handle(request);
3124
- }
3128
+ // create new request (necessary to rewrite url)
3125
3129
  request = request.clone({
3126
3130
  url: url,
3127
3131
  setHeaders: headers,