Skip to content

⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.

hotfix

Daniel82f1bd943e5b
diff --git a/apps/web/lib/shared/fetchTitleAndHeaders.ts b/apps/web/lib/shared/fetchTitleAndHeaders.ts
index 96eb058d..8a7bcefc 100644
--- a/apps/web/lib/shared/fetchTitleAndHeaders.ts
+++ b/apps/web/lib/shared/fetchTitleAndHeaders.ts
@@ -1,9 +1,12 @@
import fetch from "node-fetch";
import https from "https";
-import { HttpsProxyAgent } from 'https-proxy-agent';
+import { HttpsProxyAgent } from "https-proxy-agent";
import { SocksProxyAgent } from "socks-proxy-agent";
export default async function fetchTitleAndHeaders(url: string) {
+ if (!url?.startsWith("http://") && !url?.startsWith("https://"))
+ return { title: "", headers: null };
+
try {
const httpsAgent = new https.Agent({
rejectUnauthorized:
@@ -24,7 +27,9 @@ export default async function fetchTitleAndHeaders(url: string) {
proxy.password = process.env.PROXY_PASSWORD || "";
}
- const proxyAgent = proxy.protocol.includes("http") ? HttpsProxyAgent : SocksProxyAgent;
+ const proxyAgent = proxy.protocol.includes("http")
+ ? HttpsProxyAgent
+ : SocksProxyAgent;
// add socks5/http/https proxy to fetchOpts
fetchOpts = { agent: new proxyAgent(proxy.toString()) };
diff --git a/apps/web/package.json b/apps/web/package.json
index ae1580ba..39c7681d 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -1,6 +1,6 @@
{
"name": "@linkwarden/web",
- "version": "v2.10.2",
+ "version": "v2.10.3",
"main": "index.js",
"repository": "https://github.com/linkwarden/linkwarden.git",
"author": "Daniel31X13 <[email protected]>",
diff --git a/apps/worker/lib/archiveHandler.ts b/apps/worker/lib/archiveHandler.ts
index c2300868..8ae19e2c 100644
--- a/apps/worker/lib/archiveHandler.ts
+++ b/apps/worker/lib/archiveHandler.ts
@@ -29,7 +29,10 @@ export default async function archiveHandler(
) {
const user = link.collection?.owner;
- if (process.env.DISABLE_PRESERVATION === "true") {
+ if (
+ process.env.DISABLE_PRESERVATION === "true" ||
+ (!link.url?.startsWith("http://") && !link.url?.startsWith("https://"))
+ ) {
await prisma.link.update({
where: { id: link.id },
data: {