mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 19:33:11 +02:00
fix: respect BASE_PATH in AI chat fetch and pdfjs worker assets
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import { URL_TO_TOOL_MAP } from "@app/utils/urlMapping";
|
||||
import { BASE_PATH } from "@app/constants/app";
|
||||
|
||||
const SUBPATH = import.meta.env.VITE_RUN_SUBPATH.replace(/^\/|\/$/g, ""); // "app" or ""
|
||||
// BASE_PATH is "/bpp" or "" (no trailing slash). Strip the leading slash
|
||||
// to match the legacy SUBPATH shape used below ("bpp" or "").
|
||||
const SUBPATH = BASE_PATH.replace(/^\//, "");
|
||||
|
||||
/**
|
||||
* Normalize pathname by stripping subpath prefix and trailing slashes
|
||||
|
||||
Reference in New Issue
Block a user