mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 07:08:08 +02:00
[CSP] remove HTTP CSP Headers
This commit is contained in:
parent
99c9079f54
commit
7a43492e5f
1 changed files with 9 additions and 0 deletions
|
@ -720,6 +720,15 @@ PdfStreamConverter.prototype = {
|
|||
// Change the content type so we don't get stuck in a loop.
|
||||
aRequest.setProperty('contentType', aRequest.contentType);
|
||||
aRequest.contentType = 'text/html';
|
||||
if (isHttpRequest) {
|
||||
// We trust PDF viewer, using no CSP
|
||||
aRequest.setResponseHeader('Content-Security-Policy', '', false);
|
||||
aRequest.setResponseHeader('Content-Security-Policy-Report-Only', '',
|
||||
false);
|
||||
aRequest.setResponseHeader('X-Content-Security-Policy', '', false);
|
||||
aRequest.setResponseHeader('X-Content-Security-Policy-Report-Only', '',
|
||||
false);
|
||||
}
|
||||
|
||||
if (!rangeRequest) {
|
||||
// Creating storage for PDF data
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue