Skip to content

Commit

Permalink
fix: add correct domain to esri cors config
Browse files Browse the repository at this point in the history
  • Loading branch information
stdavis committed Apr 5, 2023
1 parent cefd562 commit ce2a6fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"cSpell.words": [
"ABES",
"autoplay",
"cloudfunctions",
"firestore",
"fishsample",
"fullscreen",
Expand Down
10 changes: 2 additions & 8 deletions _src/app/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,23 @@ define([
SimpleFillSymbol,
SimpleLineSymbol
) {
let agsDomain;
// electrofishing-query.*.utah.gov
let apiKey = 'AGRC-E029C84C956966';
let quadWord;
let databaseName = 'Electrofishing';
let dataEntryApp = 'https://electrofishing.ugrc.utah.gov';
let baseUrl;

const projectId = window.dojoConfig?.isJasmineTestRunner ? 'test' :
JSON.parse(process.env.FIREBASE_CONFIG).projectId;
let agsDomain = `us-central1-${projectId}.cloudfunctions.net`;
let baseUrl = `https://${agsDomain}/maps`;
if (has('agrc-build') === 'prod') {
// *.ugrc.utah.gov
quadWord = 'dinner-oregano-india-bahama';
agsDomain = 'wrimaps.utah.gov';
baseUrl = `https://us-central1-${projectId}.cloudfunctions.net/maps`;
} else if (has('agrc-build') === 'stage') {
// *.dev.utah.gov
quadWord = 'wedding-tactic-enrico-yes';
agsDomain = 'wrimaps.at.utah.gov';
dataEntryApp = 'https://electrofishing.dev.utah.gov';
baseUrl = `https://us-central1-${projectId}.cloudfunctions.net/maps`;
} else {
// localhost
// agsDomain = window.location.host;
Expand All @@ -58,8 +54,6 @@ define([
// global reference to App
app: null,

agsDomain,

dataEntryApp,

databaseName,
Expand Down

0 comments on commit ce2a6fd

Please sign in to comment.