Merge pull request #445 from jan-tee/main

Added env var switch to support screen captures from HTTPS sites with untrusted certificates
This commit is contained in:
Daniel 2024-02-03 16:36:01 +03:30 committed by GitHub
commit 34e0115a0f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 3 deletions

View File

@ -20,6 +20,7 @@ MAX_LINKS_PER_USER=
ARCHIVE_TAKE_COUNT=
BROWSER_TIMEOUT=
IGNORE_UNAUTHORIZED_CA=
IGNORE_HTTPS_ERRORS=
# AWS S3 Settings
SPACES_KEY=

View File

@ -4,7 +4,7 @@ import { useRouter } from "next/router";
import React, { useEffect, useState } from "react";
export default function SettingsSidebar({ className }: { className?: string }) {
const LINKWARDEN_VERSION = "v2.4.8";
const LINKWARDEN_VERSION = "v2.4.9";
const { collections } = useCollectionStore();

View File

@ -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) => {

View File

@ -1,6 +1,6 @@
{
"name": "linkwarden",
"version": "2.4.8",
"version": "2.4.9",
"main": "index.js",
"repository": "https://github.com/linkwarden/linkwarden.git",
"author": "Daniel31X13 <daniel31x13@gmail.com>",