use oauth url with origin & fix http requests
This commit is contained in:
parent
f631395f61
commit
30846478ed
@ -58,7 +58,7 @@ export abstract class GenericService<I> {
|
||||
let path = `/${this._serviceName}/${encodeURI(modelPath)}`;
|
||||
|
||||
if (typeof body === 'string') {
|
||||
path += `/${this._serviceName}/${encodeURIComponent(body)}`;
|
||||
path += `/${encodeURIComponent(body)}`;
|
||||
}
|
||||
|
||||
return this._http.delete(path, {
|
||||
|
||||
@ -7,9 +7,15 @@ import { NGXLogger } from 'ngx-logger';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
export function getKeycloakOptions(baseUrl: string, config: IqserAppConfig, tenant: string): KeycloakOptions {
|
||||
let oauthUrl = config.OAUTH_URL;
|
||||
if (!oauthUrl.startsWith('http')) {
|
||||
oauthUrl = oauthUrl.startsWith('/') ? oauthUrl : '/' + oauthUrl;
|
||||
oauthUrl = window.location.origin + oauthUrl;
|
||||
}
|
||||
|
||||
return {
|
||||
config: {
|
||||
url: config.OAUTH_URL,
|
||||
url: oauthUrl,
|
||||
realm: tenant,
|
||||
clientId: config.OAUTH_CLIENT_ID,
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user