diff options
author | dash <stanley_yip@brown.edu> | 2019-07-30 17:02:35 -0400 |
---|---|---|
committer | dash <stanley_yip@brown.edu> | 2019-07-30 17:02:35 -0400 |
commit | 8ff901c58963aca8bbe5168d233e579c8aa0686c (patch) | |
tree | cb910f0745338f2c0a488cb0c07fe3aa1eb28704 /src | |
parent | 2d0c2f56c5160f2796e5dfff31e391d5e64a806f (diff) |
remap
Diffstat (limited to 'src')
-rw-r--r-- | src/server/remapUrl.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server/remapUrl.ts b/src/server/remapUrl.ts index 6f4d6642f..69c766d56 100644 --- a/src/server/remapUrl.ts +++ b/src/server/remapUrl.ts @@ -6,7 +6,8 @@ const suffixMap: { [type: string]: true } = { "video": true, "pdf": true, "audio": true, - "web": true + "web": true, + "image": true }; async function update() { @@ -30,10 +31,10 @@ async function update() { const value = fields[key]; if (value && value.__type && suffixMap[value.__type]) { const url = new URL(value.url); - if (url.href.includes("azure")) { + if (url.href.includes("localhost") && url.href.includes("Bill")) { dynfield = true; - update.$set = { ["fields." + key + ".url"]: `${url.protocol}//localhost:1050${url.pathname}` }; + update.$set = { ["fields." + key + ".url"]: `${url.protocol}//dash-web.eastus2.cloudapp.azure.com:1050${url.pathname}` }; } } } |