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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user