Skip to content

Commit

Permalink
More PR Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
cameron-eyds committed Dec 23, 2019
1 parent 70d1496 commit 8b68a40
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion bcrs-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions bcrs-ui/public/config/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
2 changes: 1 addition & 1 deletion bcrs-ui/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>hello-world</title>
<link rel="icon" href="dummy-not-used-do-not-remove">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<link rel="icon" href="<%= BASE_URL %>favicon.png">
<link rel="preload" href="<%= BASE_URL %>fonts/materialdesignicons-webfont.927457ed.woff2" as="font" type="font/woff2" crossorigin>
</head>
<body>
Expand Down
9 changes: 0 additions & 9 deletions bcrs-ui/src/utils/config-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,6 @@ export const fetchConfig = (): Promise<any> => {
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.')
})
}

Expand Down
13 changes: 12 additions & 1 deletion bcrs-ui/vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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': ''
}
}
}
}
}

0 comments on commit 8b68a40

Please sign in to comment.