diff options
| author | s-ol <s+removethis@s-ol.nu> | 2022-01-12 09:19:47 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2022-01-12 09:33:13 +0000 |
| commit | 7bcd1e44d3f78a4120be295f6a31b57917cee563 (patch) | |
| tree | 97876551f64f7eb0fb78b963d985bc1d1580d7dc /src/index.js | |
| parent | handle errors while loading more gracefully (diff) | |
| download | fedidag-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.js | 6 |
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; |
