fix: PDF nur Wayback Machine, archive.ph nur Browser-Link
This commit is contained in:
@@ -166,8 +166,8 @@ router.post('/check', authenticate, async (req, res) => {
|
||||
router.post('/pdf', authenticate, async (req, res) => {
|
||||
const { archiveUrl } = req.body;
|
||||
if (!archiveUrl || typeof archiveUrl !== 'string') return res.status(400).json({ error: 'archiveUrl fehlt' });
|
||||
if (!/^https?:\/\/(archive\.(is|ph|today|fo|li|vn|md|gg)|web\.archive\.org)\//.test(archiveUrl)) {
|
||||
return res.status(400).json({ error: 'Ungültige Archiv-URL' });
|
||||
if (!archiveUrl.startsWith('https://web.archive.org/')) {
|
||||
return res.status(400).json({ error: 'PDF nur für Wayback Machine URLs (web.archive.org) verfügbar' });
|
||||
}
|
||||
|
||||
let browser;
|
||||
|
||||
Reference in New Issue
Block a user