mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
Unable to disable WebSecurity (or set any web preferences) #413
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ddaspit on GitHub (Nov 29, 2019).
Originally assigned to: @GregorBiswanger on GitHub.
When you create a browser window with
WebSecurityset tofalse, it doesn't work. This seems to occur, because inbrowserWindows.ts, thecreateBrowserWindowhandler only performs a shallow merge when merging theoptionsparameter in order to setnodeIntegrationtotrue. This results in the entirewebPreferencesobject being overwritten.Steps to Reproduce:
This can be reproduced using the Electron.NET music player sample app.
@GregorBiswanger commented on GitHub (Dec 3, 2019):
The music player app is still based on an old Electron.NET version. I have to update this somehow. I tried a new example with the current Electron.NET 7.30.2 version and it worked without problems. I have access to files and can play them.
I used the same code snippets from:
http://www.cross-platform-blog.com/electron.net/electron.net-musicplayer-app-with-asp.net-core/
@ddaspit commented on GitHub (Dec 4, 2019):
I forked the music player sample app and updated it to 7.30.2. The master branch demonstrates the issue. When I click the play button, it does not play and I receive the following error in the console:
When I paste the file URL directly into Chrome, it plays correctly.
@jlcool commented on GitHub (Feb 4, 2020):
Is there any progress on this issue
@duncanawoods commented on GitHub (Feb 6, 2020):
This is also a problem for me. I've just had to rewrite a bunch of things to serve up local files via the http server as a work-around which shouldn't be necessary.
Possibly related to this?
https://github.com/electron/electron/issues/19846
@syedadeel2 commented on GitHub (Mar 2, 2020):
That is correct!! if I set the nodeIntegration = false its works
WebPreferences = new WebPreferences { WebSecurity = false, AllowRunningInsecureContent = true, ExperimentalCanvasFeatures=true, ScrollBounce=true, NodeIntegration = false }@GregorBiswanger commented on GitHub (May 10, 2020):
Works with the new Electron.NET 8.31.1.