diff --git a/docs/ZXDB.md b/docs/ZXDB.md index 99f3128..94a7785 100644 --- a/docs/ZXDB.md +++ b/docs/ZXDB.md @@ -53,7 +53,6 @@ ZXDB_LOCAL_FILEPATH=/path/to/your/zxdb/mirror WOS_LOCAL_FILEPATH=/path/to/your/wos/mirror # Optional: Remote path prefixes to strip from database links before prepending local paths -# Defaults shown below if omitted: ZXDB_FILE_PREFIX=/zxdb/sinclair/ WOS_FILE_PREFIX=/pub/sinclair/ ``` diff --git a/example.env b/example.env index 6e16555..ac83af2 100644 --- a/example.env +++ b/example.env @@ -29,7 +29,6 @@ CDN_CACHE=/mnt/files/zxfiles # WOS_LOCAL_FILEPATH=/path/to/local/wos/mirror # Optional: Path prefixes to strip from database links before local matching. -# Defaults to "/zxdb/sinclair/" and "/pub/sinclair/" if omitted. # ZXDB_FILE_PREFIX=/zxdb/sinclair/ # WOS_FILE_PREFIX=/pub/sinclair/ diff --git a/src/server/repo/zxdb.ts b/src/server/repo/zxdb.ts index 63ddcbf..e26a4ef 100644 --- a/src/server/repo/zxdb.ts +++ b/src/server/repo/zxdb.ts @@ -117,8 +117,8 @@ export interface EntryFacets { function resolveLocalLink(fileLink: string): string | null { let localPath: string | null = null; - const zxdbPrefix = env.ZXDB_FILE_PREFIX || "/zxdb/sinclair/"; - const wosPrefix = env.WOS_FILE_PREFIX || "/pub/sinclair/"; + const zxdbPrefix = env.ZXDB_FILE_PREFIX || ""; + const wosPrefix = env.WOS_FILE_PREFIX || ""; if (fileLink.startsWith(zxdbPrefix) && env.ZXDB_LOCAL_FILEPATH) { const sub = fileLink.slice(zxdbPrefix.replace(/\/$/, "").length);