Skip to content

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

Added environment variable "IGNORE_SSL_ERRORS" to instruct playwright/Chromium to ignore SSL errors; this is useful to support generation of browser screenshots from sources with self-signed certificates or untrusted CAs, but also opens the possibility to index sites with rejected certificates; so it should not be enabled as a default behavior.

Jan Tae3cf104b796
diff --git a/.env.sample b/.env.sample
index d2a8d608..ad560751 100644
--- a/.env.sample
+++ b/.env.sample
@@ -20,6 +20,7 @@ MAX_LINKS_PER_USER=
ARCHIVE_TAKE_COUNT=
BROWSER_TIMEOUT=
IGNORE_UNAUTHORIZED_CA=
+IGNORE_HTTPS_ERRORS=
# AWS S3 Settings
SPACES_KEY=
diff --git a/lib/api/archiveHandler.ts b/lib/api/archiveHandler.ts
index 60ea7901..88ff97ec 100644
--- a/lib/api/archiveHandler.ts
+++ b/lib/api/archiveHandler.ts
@@ -21,7 +21,11 @@ const BROWSER_TIMEOUT = Number(process.env.BROWSER_TIMEOUT) || 5;
export default async function archiveHandler(link: LinksAndCollectionAndOwner) {
const browser = await chromium.launch();
- const context = await browser.newContext(devices["Desktop Chrome"]);
+ const context = await browser.newContext({
+ ...devices["Desktop Chrome"],
+ ignoreHTTPSErrors:
+ process.env.IGNORE_HTTPS_ERRORS === "true",
+ });
const page = await context.newPage();
const timeoutPromise = new Promise((_, reject) => {