Browse Source

add x requested with header, (#13268)

fix dev app environment
pull/13278/head
Muhammed Altuğ 4 years ago
committed by GitHub
parent
commit
8fa95588d4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      npm/ng-packs/apps/dev-app/src/environments/environment.prod.ts
  2. 3
      npm/ng-packs/apps/dev-app/src/environments/environment.ts
  3. 4
      npm/ng-packs/packages/core/src/lib/interceptors/api.interceptor.ts

2
npm/ng-packs/apps/dev-app/src/environments/environment.prod.ts

@ -11,7 +11,7 @@ export const environment = {
logoUrl: '',
},
oAuthConfig: {
issuer: 'https://localhost:44305',
issuer: 'https://localhost:44305/',
redirectUri: baseUrl,
clientId: 'MyProjectName_App',
responseType: 'code',

3
npm/ng-packs/apps/dev-app/src/environments/environment.ts

@ -11,9 +11,8 @@ export const environment = {
logoUrl: '',
},
oAuthConfig: {
issuer: 'https://localhost:44305',
issuer: 'https://localhost:44305/',
clientId: 'MyProjectName_App',
dummyClientSecret: '1q2w3e*',
scope: 'offline_access MyProjectName',
responseType: 'code',
redirectUri: baseUrl,

4
npm/ng-packs/packages/core/src/lib/interceptors/api.interceptor.ts

@ -1,5 +1,5 @@
import { HttpHandler, HttpHeaders, HttpInterceptor, HttpRequest } from '@angular/common/http';
import { Injectable, Inject } from '@angular/core';
import { Inject, Injectable } from '@angular/core';
import { OAuthService } from 'angular-oauth2-oidc';
import { finalize } from 'rxjs/operators';
import { SessionStateService } from '../services/session-state.service';
@ -46,6 +46,8 @@ export class ApiInterceptor implements HttpInterceptor {
headers[this.tenantKey] = tenant.id;
}
headers['X-Requested-With'] = 'XMLHttpRequest';
return headers;
}
}

Loading…
Cancel
Save