diff --git a/bcrs-ui/package.json b/bcrs-ui/package.json
index 73e3af1..64d79c6 100644
--- a/bcrs-ui/package.json
+++ b/bcrs-ui/package.json
@@ -6,7 +6,7 @@
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
- "test:unit": "vue-cli-service test:unit --testPathPattern"
+ "test:unit": "vue-cli-service test:unit --testPathPattern=."
},
"dependencies": {
"@mdi/font": "^4.5.95",
diff --git a/bcrs-ui/public/config/configuration.json b/bcrs-ui/public/config/configuration.json
index bdbda8c..4596eab 100644
--- a/bcrs-ui/public/config/configuration.json
+++ b/bcrs-ui/public/config/configuration.json
@@ -2,6 +2,5 @@
"API_URL": "https://legal-api-dev.pathfinder.gov.bc.ca/api/v1/businesses/",
"AUTH_API_URL": "https://auth-api-dev.pathfinder.gov.bc.ca/api/v1/",
"PAY_API_URL": "https://pay-api-dev.pathfinder.gov.bc.ca/api/v1/",
- "KEYCLOAK_CONFIG_URL": "/local-keycloak-config-url/keycloak.json",
- "ADDRESS_COMPLETE_KEY": "RH99-RN99-GB72-FW86"
+ "KEYCLOAK_CONFIG_URL": "/local-keycloak-config-url/keycloak.json"
}
diff --git a/bcrs-ui/public/index.html b/bcrs-ui/public/index.html
index 413a3bb..47081f6 100644
--- a/bcrs-ui/public/index.html
+++ b/bcrs-ui/public/index.html
@@ -6,7 +6,7 @@
hello-world
-
+
diff --git a/bcrs-ui/src/utils/config-helper.ts b/bcrs-ui/src/utils/config-helper.ts
index 1594271..5ed1772 100644
--- a/bcrs-ui/src/utils/config-helper.ts
+++ b/bcrs-ui/src/utils/config-helper.ts
@@ -48,15 +48,6 @@ export const fetchConfig = (): Promise => {
const keycloakConfigUrl = response.data['KEYCLOAK_CONFIG_URL']
sessionStorage.setItem('KEYCLOAK_CONFIG_URL', keycloakConfigUrl)
console.info('Set KeyCloak config URL to: ' + keycloakConfigUrl)
-
- // Extend the window with type
- let myWindow = window as any
-
- myWindow.addressCompleteKey = response.data['ADDRESS_COMPLETE_KEY']
- console.log('Set Address Complete Key.')
-
- myWindow['ldClientId'] = response.data['LD_CLIENT_ID']
- console.log('Set LD Client Id.')
})
}
diff --git a/bcrs-ui/vue.config.js b/bcrs-ui/vue.config.js
index 2ac3b31..295307e 100644
--- a/bcrs-ui/vue.config.js
+++ b/bcrs-ui/vue.config.js
@@ -6,5 +6,16 @@ module.exports = {
'vue-plugin-helper-decorator',
'vuetify'
],
- publicPath: `/${process.env.VUE_APP_PATH}`
+ publicPath: `/${process.env.VUE_APP_PATH}`,
+ devServer: {
+ proxy: {
+ // this is needed to prevent a CORS error when running locally
+ '/local-keycloak-config-url/*': {
+ target: 'https://dev.bcregistry.ca/cooperatives/auth/config/kc/',
+ pathRewrite: {
+ '/local-keycloak-config-url': ''
+ }
+ }
+ }
+ }
}