Skip to content

Commit

Permalink
revert hardcoding of base URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
athu-tran committed Oct 8, 2024
1 parent 6b5ef3b commit d815acc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/views/CVERecord/CVERecord.vue
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,7 @@ export default {
const getIdUrl = `/api/cve-id/${usecveRecordStore().cveId}`;
try {
// axios.defaults.baseURL = `https://${import.meta.env.VITE_CVE_SERVICES_BASE_URL}`;
axios.defaults.baseURL = "https://cveawg.mitre.org";
axios.defaults.baseURL = `https://${import.meta.env.VITE_CVE_SERVICES_BASE_URL}`;
const idData = await axios.get(getIdUrl);
this.getIdStatusCode = 200;
if (idData.status === 200 && idData?.data?.error === undefined) {
Expand Down Expand Up @@ -244,8 +243,7 @@ export default {
}
},
async getRecordData() {
// const getRecordUrl = `https://${import.meta.env.VITE_CVE_SERVICES_BASE_URL}/api/cve/${usecveRecordStore().cveId}`;
const getRecordUrl = `https://cveawg.mitre.org/api/cve/${usecveRecordStore().cveId}`;
const getRecordUrl = `https://${import.meta.env.VITE_CVE_SERVICES_BASE_URL}/api/cve/${usecveRecordStore().cveId}`;
const recordData = await axios.get(getRecordUrl);
if (!(typeof (recordData.data) === 'object')) {
Expand Down

0 comments on commit d815acc

Please sign in to comment.