MISC: Log invalid file request in Electron app (#1267)

This commit is contained in:
catloversg 2024-05-12 07:04:54 +07:00 committed by GitHub
parent 7ee7a79763
commit e478b9a224
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -206,7 +206,7 @@ app.on("ready", async () => {
if ((method === "GET" && relativePath.startsWith("dist")) || relativePath.match(/^[a-zA-Z-_]*\.html/)) {
return callback(filePath);
}
log.error("Tried to access a page outside sandbox.");
log.error(`Tried to access a page outside the sandbox. Url: ${url}. Method: ${method}.`);
callback(path.join(__dirname, "fileError.txt"));
});