参考这些文档:https://www.electronjs.org/docs/latest/api/structures/custom-scheme
这些特权实际上是做什么的?特别是standard
、secure,
和stream
的不确定性:
privileges
对象(可选)standard
boolean(可选)-默认为false。secure
boolean(可选)-默认为false。bypassCSP
boolean(可选)-默认为false。allowServiceWorkers
boolean(可选)-默认为false。supportFetchAPI
boolean(可选)-默认为false。corsEnabled
boolean(可选)-默认为false。stream
boolean(可选)-默认为false。
选项standard
,secure
,bypassCSP
和corsEnabled
对应于本文件中描述的铬方法。
因此,secure
选项意味着该方案不会触发混合内容警告。
选项allowServiceWorkers
和supportFetchAPI
分别用于在chromium引擎中将此方案注册为支持service worker和fetch API。
选项stream
指定此方案将用于音频或视频流。