New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Native PDF plugin does not support custom protocol #24859
Comments
|
I'm guessing this might be due to plugin processes not implementing scheme configurations the same way renderers do. |
|
This may be related to #24011 |
|
I ran into this issue and found that the PDF does render if CSP is disabled with Perhaps related to the discussion at https://bugs.chromium.org/p/chromium/issues/detail?id=271452 |
|
I am using beaker browser, it has a similar problem beakerbrowser/beaker#1687, do you know how to bypass the CSP to make PDF render? @pat-flew |
|
@gscholer To test this, it would need to be added to the scheme privileges of the protocol being used. Where is best asked of someone over there, but it's probably https://github.com/beakerbrowser/beaker/blob/63dd71e3cd0ae151ec6160b5b02d10afe483614f/app/main.js#L75. If it is the same issue, this is a clumsy solution as you likely don't want to completely disable CSP. The real resolution may need to come upstream from chromium but idk. |
|
@pat-flew Thank you, that worked. I have add |
When using a custom protocol to render
my-app://dummy.pdf:Content-Type: application/pdfalong with an HTML response containing an<embed type='application/pdf'>.my-app://dummy.pdfis valid seen from an XMLHttpRequest (as seen from right of screenshot 3)file:///dummy.pdfrenders properly.This is what the request looks like in developer console:
Top left:
file:///dummy.pdf. Bottom left:my-app://dummy.pdf. Right:my-app://dummy.pdfas seen from an XMLHttpRequest.Preflight Checklist
Issue Details
Expected Behavior
PDF renders with
my-app://dummy.pdfActual Behavior
PDF plugin shows up, but is empty.
To Reproduce
electron-quick-start.main.js
Add to index.html
For extra debugging, add to renderer.js
Additional Information
The text was updated successfully, but these errors were encountered: