fix: CSP connect-src web.archive.org, Clipboard ohne Permission-Dialog
This commit is contained in:
@@ -33,7 +33,7 @@ app.use((_req, res, next) => {
|
|||||||
"style-src 'self' 'unsafe-inline' https://fonts.googleapis.com",
|
"style-src 'self' 'unsafe-inline' https://fonts.googleapis.com",
|
||||||
"font-src 'self' https://fonts.gstatic.com",
|
"font-src 'self' https://fonts.gstatic.com",
|
||||||
// iCal-Feeds werden serverseitig geprosxt → nur 'self' nötig
|
// iCal-Feeds werden serverseitig geprosxt → nur 'self' nötig
|
||||||
"connect-src 'self'",
|
"connect-src 'self' https://web.archive.org",
|
||||||
// data: für Avatare (base64), google.com + gstatic.com für Favicons im QuickLinks-Widget
|
// data: für Avatare (base64), google.com + gstatic.com für Favicons im QuickLinks-Widget
|
||||||
"img-src 'self' data: https://www.google.com https://*.gstatic.com https://image.tmdb.org",
|
"img-src 'self' data: https://www.google.com https://*.gstatic.com https://image.tmdb.org",
|
||||||
"worker-src 'self'",
|
"worker-src 'self'",
|
||||||
|
|||||||
@@ -94,11 +94,17 @@ export default function PaywallKiller() {
|
|||||||
setTimeout(() => inputRef.current?.focus(), 50);
|
setTimeout(() => inputRef.current?.focus(), 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handlePaste() {
|
function handlePaste() {
|
||||||
try {
|
// Fokus ins Input setzen und nativen Paste auslösen – kein Permission-Dialog
|
||||||
const text = await navigator.clipboard.readText();
|
const input = inputRef.current;
|
||||||
if (text) setInputUrl(text.trim());
|
if (!input) return;
|
||||||
} catch { inputRef.current?.focus(); }
|
input.focus();
|
||||||
|
// execCommand('paste') funktioniert auf Android ohne Clipboard-Permission
|
||||||
|
const ok = document.execCommand('paste');
|
||||||
|
if (!ok) {
|
||||||
|
// Fallback: nur fokussieren, User kann selbst einfügen
|
||||||
|
input.select();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const isChecking = status === 'checking';
|
const isChecking = status === 'checking';
|
||||||
|
|||||||
Reference in New Issue
Block a user