Commit 7729f5c 1 parent acfa862 commit 7729f5c Copy full SHA for 7729f5c
File tree 1 file changed +14
-1
lines changed
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -4,9 +4,22 @@ let keycloak = null
4
4
let isInitialized = false
5
5
let initPromise = null
6
6
7
+ let keycloakRedirect = null
8
+ let hostname = window . location . hostname
9
+
10
+ if ( hostname == 'ffiec.beta.cfpb.gov' ) {
11
+ keycloakRedirect = 'ffiec.cfpb.gov'
12
+ } else if ( hostname . includes ( '4-beta' ) ) {
13
+ keycloakRedirect = hostname . replace ( '4-beta.demo' , 'dev' )
14
+ } else if ( hostname . includes ( '-beta' ) ) {
15
+ keycloakRedirect = hostname . replace ( '-beta' , '' )
16
+ } else {
17
+ keycloakRedirect = hostname
18
+ }
19
+
7
20
const keycloakConfig = {
8
21
"realm" : "hmda2" ,
9
- "url" : " https://{{domain}}} /auth" ,
22
+ "url" : ` https://${ keycloakRedirect } /auth` ,
10
23
"clientId" : "hmda2-api" ,
11
24
"public-client" : true ,
12
25
"use-resource-role-mappings" : true ,
You can’t perform that action at this time.
0 commit comments