Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.11.1, 5.12.0
-
None
-
Windows 10 x64
MSVC Prof. 2017 15.8.1
-
-
098680710ad3db2e9bd62928a9e2fb1c7cb8c4a9 (qt/qtwebengine/5.12)
Description
Hi all,
I'm using pdf.js out of the resource system (qrc) and if I want to load a local pdf file the engine moans:
Cross origin requests are only supported for protocol schemes: http, data, chrome, https.", source: qrc:///pdfjs/pdfjs/pdf.worker.js (13)
I've tried, as the documentation stated about the QWebEngineSettings, to disable the cross origin rule via QWebEngineSettings::LocalContentCanAccessRemoteUrls.
I've set this attribute in the WebEngineView and in the WebPage too, but it doesn't solve the issue.
I've tried QWebEngineSettings::LocalContentCanAccessFileUrls additionally too, without any effect.
There was no other way to turn it off as setting up the argument "--disable-web-security" for QApplication during the start.
I would say it's a bug, or?
Attachments
For Gerrit Dashboard: QTBUG-70228 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
242976,3 | Allow XMLHttpRequests from qrc to file | 5.12 | qt/qtwebengine | Status: MERGED | +2 | 0 |