changed env variable name
This commit is contained in:
parent
4c3d282d41
commit
16df58d754
@ -7,7 +7,7 @@ import {Observable} from "rxjs";
|
|||||||
export enum AppConfigKey {
|
export enum AppConfigKey {
|
||||||
KEYCLOAK_URL = "KEYCLOAK_URL",
|
KEYCLOAK_URL = "KEYCLOAK_URL",
|
||||||
KEYCLOAK_REALM = "KEYCLOAK_REALM",
|
KEYCLOAK_REALM = "KEYCLOAK_REALM",
|
||||||
KEYCLOAK_CLIENT_ID = "KEYCLOAK_CLIENT_ID",
|
API_CLIENT = "API_CLIENT",
|
||||||
API_URL = "API_URL",
|
API_URL = "API_URL",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import {HttpEvent, HttpHandler, HttpInterceptor, HttpRequest} from '@angular/common/http';
|
import {HttpEvent, HttpHandler, HttpInterceptor, HttpRequest} from '@angular/common/http';
|
||||||
import {Injectable} from '@angular/core';
|
import {Injectable} from '@angular/core';
|
||||||
import {Observable} from 'rxjs';
|
import {Observable} from 'rxjs';
|
||||||
import {AppConfigService} from "../app-config/app-config.service";
|
import {AppConfigKey, AppConfigService} from "../app-config/app-config.service";
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ApiPathInterceptorService implements HttpInterceptor {
|
export class ApiPathInterceptorService implements HttpInterceptor {
|
||||||
@ -11,16 +11,13 @@ export class ApiPathInterceptorService implements HttpInterceptor {
|
|||||||
|
|
||||||
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
||||||
|
|
||||||
// if (!req.url.startsWith('/assets')) {
|
if (!req.url.startsWith('/assets')) {
|
||||||
// const updatedRequest = req.clone({
|
const updatedRequest = req.clone({
|
||||||
// url: this._appConfigService.getConfig(AppConfigKey.API_URL) + req.url
|
url: this._appConfigService.getConfig(AppConfigKey.API_URL) + req.url
|
||||||
// })
|
})
|
||||||
//
|
return next.handle(updatedRequest);
|
||||||
// console.log(req);
|
} else {
|
||||||
//
|
|
||||||
// return next.handle(updatedRequest);
|
|
||||||
// } else {
|
|
||||||
return next.handle(req);
|
return next.handle(req);
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,7 @@ export function keycloakInitializer(keycloak: KeycloakService, appConfigService:
|
|||||||
config: {
|
config: {
|
||||||
url: appConfigService.getConfig(AppConfigKey.KEYCLOAK_URL),
|
url: appConfigService.getConfig(AppConfigKey.KEYCLOAK_URL),
|
||||||
realm: appConfigService.getConfig(AppConfigKey.KEYCLOAK_REALM),
|
realm: appConfigService.getConfig(AppConfigKey.KEYCLOAK_REALM),
|
||||||
clientId: appConfigService.getConfig(AppConfigKey.KEYCLOAK_CLIENT_ID)
|
clientId: appConfigService.getConfig(AppConfigKey.API_CLIENT)
|
||||||
},
|
},
|
||||||
initOptions: {
|
initOptions: {
|
||||||
checkLoginIframe: false,
|
checkLoginIframe: false,
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"KEYCLOAK_URL": "https://keycloak-dev.iqser.cloud/auth",
|
"KEYCLOAK_URL": "https://keycloak-dev.iqser.cloud/auth",
|
||||||
"KEYCLOAK_REALM": "dev",
|
"KEYCLOAK_REALM": "dev",
|
||||||
"KEYCLOAK_CLIENT_ID": "gin-client",
|
"API_CLIENT": "gin-client",
|
||||||
"API_URL": ""
|
"API_URL": ""
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user