Skip to content

Commit ac6dd2e

Browse files
AddisonSchillerfelliott
authored andcommitted
Allow same origin in sandboxing to unbreak pdf rendering
* The pdf renderer was trying to load pdfs via an ajax call within the iframe. The load was failing with a CORS error because requests within the sandbox have their Origin headers set to "null". Turning on allow-same-origin within the sandbox should allow the requests to set their actual origin.
1 parent b2ba110 commit ac6dd2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mfr/server/static/js/mfr.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
self.pymParent.iframe.setAttribute('allowfullscreen', '');
8181
self.pymParent.iframe.setAttribute('webkitallowfullscreen', '');
8282
self.pymParent.iframe.setAttribute('scrolling', 'yes');
83-
self.pymParent.iframe.setAttribute('sandbox', 'allow-scripts allow-popups');
83+
self.pymParent.iframe.setAttribute('sandbox', 'allow-scripts allow-popups allow-same-origin');
8484

8585
self.pymParent.el.appendChild(self.spinner);
8686
$(self.pymParent.iframe).on('load', function () {

0 commit comments

Comments
 (0)