Skip to content

Commit

Permalink
Remove frame-src CSP to allow tunnel access
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Yu committed Oct 5, 2024
1 parent 6c593ce commit 2196fa2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/preview/viewer/pdfviewerpanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ async function getPDFViewerContent(pdfUri: vscode.Uri): Promise<string> {
logger.log(`Internal PDF viewer at ${iframeSrcUrl} .`)
const rebroadcast: boolean = getKeyboardEventConfig()
return `
<!DOCTYPE html><html><head><meta http-equiv="Content-Security-Policy" content="default-src 'none'; base-uri 'none'; frame-src ${iframeSrcOrigin}; script-src 'unsafe-inline'; style-src 'unsafe-inline';"></head>
<!DOCTYPE html><html><head><meta http-equiv="Content-Security-Policy" content="default-src 'none'; base-uri 'none'; script-src 'unsafe-inline'; style-src 'unsafe-inline';"></head>
<body><iframe id="preview-panel" class="preview-panel" src="${iframeSrcUrl}" style="position:absolute; border: none; left: 0; top: 0; width: 100%; height: 100%;">
</iframe>
<script>
Expand Down

0 comments on commit 2196fa2

Please sign in to comment.