@abi-software/map-side-bar 2.14.8-demo.5 → 2.14.8-demo.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/map-side-bar",
3
- "version": "2.14.8-demo.5",
3
+ "version": "2.14.8-demo.6",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
package/src/App.vue CHANGED
@@ -137,7 +137,6 @@ export default {
137
137
  ROOT_URL: import.meta.env.VITE_APP_ROOT_URL,
138
138
  FLATMAPAPI_LOCATION: import.meta.env.VITE_FLATMAPAPI_LOCATION,
139
139
  CELL_CARDS_API: import.meta.env.VITE_APP_CELL_CARDS_API,
140
- CORS_PROXY_API: import.meta.env.VITE_CORS_PROXY_API,
141
140
  },
142
141
  connectivityEntry: [],
143
142
  createData: {
@@ -899,18 +899,20 @@ export default {
899
899
  this.expertConsultants = this.expertConsultantURLs.map(url => ({ name: '', url }));
900
900
 
901
901
  for (const url of this.expertConsultantURLs) {
902
- const isScicrunchURL = url.startsWith('https://scicrunch.org');
903
- const isOrcidURL = url.startsWith('https://orcid.org');
902
+ const scicrunchBase = 'https://scicrunch.org';
903
+ const orcidBase = 'https://orcid.org';
904
+ const orcidAPIBase = 'https://pub.orcid.org/v2.1';
905
+ const apiLocationBase = (this.envVars.API_LOCATION ?? '').replace(/\/?$/, '/');
906
+ const isScicrunchURL = url.startsWith(scicrunchBase);
907
+ const isOrcidURL = url.startsWith(orcidBase);
904
908
 
905
909
  if (!isScicrunchURL && !isOrcidURL) {
906
910
  console.warn(`Unsupported expert consultant URL: ${url}`);
907
911
  continue;
908
912
  }
909
913
 
910
- // TEMPORARY: Use a CORS proxy for SciCrunch API requests
911
- const corsProxy = this.envVars.CORS_PROXY_API;
912
- const scicrunchAPIURL = (targetURL) => `${corsProxy}?target=${targetURL}.json`;
913
- const orcidAPIURL = (targetURL) => targetURL.replace('orcid.org', 'pub.orcid.org/v2.1');
914
+ const scicrunchAPIURL = (targetURL) => targetURL.replace(scicrunchBase, `${apiLocationBase}scicrunch`);
915
+ const orcidAPIURL = (targetURL) => targetURL.replace(orcidBase, orcidAPIBase);
914
916
  const APIURL = isScicrunchURL ? scicrunchAPIURL(url) : orcidAPIURL(url);
915
917
 
916
918
  try {