Remove default path prefixes for local mirroring

- Removed hardcoded defaults for ZXDB_FILE_PREFIX and WOS_FILE_PREFIX in
  resolveLocalLink.
- Updated docs/ZXDB.md and example.env to remove mentions of defaults.
- Default behavior is now no prefix stripping if variables are omitted.

Signed-off-by: Junie@lucy.xalior.com
This commit is contained in:
2026-02-17 12:35:46 +00:00
parent ab7872b610
commit 2e47b598c1
3 changed files with 2 additions and 4 deletions

View File

@@ -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);