Merge pull request #7298 from deepak1556/content_settings_patch
protocol: disable storage for non standard custom schemes
This commit is contained in:
commit
4c8d0ab804
11 changed files with 230 additions and 3 deletions
|
@ -50,8 +50,11 @@ non-standard schemes can not recognize relative URLs:
|
|||
|
||||
Registering a scheme as standard will allow access to files through the
|
||||
[FileSystem API][file-system-api]. Otherwise the renderer will throw a security
|
||||
error for the scheme. So in general if you want to register a custom protocol to
|
||||
replace the `http` protocol, you have to register it as a standard scheme:
|
||||
error for the scheme.
|
||||
|
||||
By default web storage apis (localStorage, sessionStorage, webSQL, indexedDB, cookies)
|
||||
are disabled for non standard schemes. So in general if you want to register a
|
||||
custom protocol to replace the `http` protocol, you have to register it as a standard scheme:
|
||||
|
||||
```javascript
|
||||
const {app, protocol} = require('electron')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue