aboutsummaryrefslogtreecommitdiffstats
path: root/src/index.js
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2022-01-12 09:19:47 +0000
committers-ol <s+removethis@s-ol.nu>2022-01-12 09:33:13 +0000
commit7bcd1e44d3f78a4120be295f6a31b57917cee563 (patch)
tree97876551f64f7eb0fb78b963d985bc1d1580d7dc /src/index.js
parenthandle errors while loading more gracefully (diff)
downloadfedidag-7bcd1e44d3f78a4120be295f6a31b57917cee563.tar.gz
fedidag-7bcd1e44d3f78a4120be295f6a31b57917cee563.zip
add instructions and commands for local CORS proxy
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/index.js b/src/index.js
index 5fdda36..e94dec9 100644
--- a/src/index.js
+++ b/src/index.js
@@ -14,9 +14,9 @@ const context = [
];
-const corsOrigin = process.env.CORS_ORIGIN || location.origin;
-console.log(corsOrigin);
-const cors = (url) => `${corsOrigin}/remote/${url}`;
+const corsPrefix = process.env.CORS_PREFIX || `${location.origin}/remote`;
+console.log(corsPrefix);
+const cors = (url) => `${corsPrefix}/${url}`;
function wrapCache(target) {
const orig = target.descriptor.value;