Skip to content

Commit 332722e

Browse files
committedJan 24, 2023
[Keycloak] Redirect Institutions API on ProdBeta to Prod
1 parent 409c449 commit 332722e

File tree

1 file changed

+10
-1
lines changed
  • kubernetes/keycloak/theme-provider/themes/hmda/login/resources/js

1 file changed

+10
-1
lines changed
 

‎kubernetes/keycloak/theme-provider/themes/hmda/login/resources/js/register.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,19 @@
103103

104104
}
105105

106+
// ProdBeta will use Prod data,
107+
// other systems will use data from their host.
108+
function deriveInstitutionsApiHost() {
109+
if (window.location.host == 'ffiec.beta.cfpb.gov')
110+
return 'https://ffiec.cfpb.gov'
111+
112+
return ''
113+
}
114+
106115
//AJAX call to get data, calls buildList with returned institutions
107116
function getInstitutions(domain) {
108117
$.ajax({
109-
url: '/v2/public/institutions',
118+
url: deriveInstitutionsApiHost() + '/v2/public/institutions',
110119
statusCode: {
111120
404: function() {
112121
$('#institutions')

0 commit comments

Comments
 (0)