Fix: fix carto layers

This commit is contained in:
Pieter Vander Vennet 2025-07-10 22:09:58 +02:00
parent 4be89ffdd3
commit 8f219244da
2 changed files with 36 additions and 19 deletions

View file

@ -205,6 +205,10 @@ export default class ScriptUtils {
headers?: any,
timeoutSecs?: number
): Promise<{ content: string } | { redirect: string } | "timeout"> {
if (url === undefined || url === null) {
console.trace("URL is null or undefined")
throw ("Invalid url: " + url)
}
if (url.startsWith("./assets")) {
return Promise.resolve({ content: readFileSync("./public/" + url, "utf8") })
}