refactor: remove security dangerousRemoteDomainIpcAccess config
This commit is contained in:
8
bin/builders/common.ts
vendored
8
bin/builders/common.ts
vendored
@@ -38,8 +38,12 @@ export async function promptText(message: string, initial?: string) {
|
|||||||
|
|
||||||
function setSecurityConfigWithUrl(tauriConfig: NextTauriConfig, url: string) {
|
function setSecurityConfigWithUrl(tauriConfig: NextTauriConfig, url: string) {
|
||||||
const myURL = new URL(url);
|
const myURL = new URL(url);
|
||||||
const hostname = myURL.hostname;
|
const currentUrlConfig: DangerousRemoteDomainIpAccess = {
|
||||||
tauriConfig.tauri.security.dangerousRemoteDomainIpcAccess[0].domain = hostname;
|
domain: myURL.hostname,
|
||||||
|
windows: ["pake"],
|
||||||
|
enableTauriAPI: true,
|
||||||
|
};
|
||||||
|
tauriConfig.tauri.security.dangerousRemoteDomainIpcAccess = [currentUrlConfig];
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function mergeTauriConfig(
|
export async function mergeTauriConfig(
|
||||||
|
|||||||
@@ -5,16 +5,7 @@
|
|||||||
},
|
},
|
||||||
"tauri": {
|
"tauri": {
|
||||||
"security": {
|
"security": {
|
||||||
"csp": null,
|
"csp": null
|
||||||
"dangerousRemoteDomainIpcAccess": [
|
|
||||||
{
|
|
||||||
"domain": "weread.qq.com",
|
|
||||||
"windows": [
|
|
||||||
"pake"
|
|
||||||
],
|
|
||||||
"enableTauriAPI": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"updater": {
|
"updater": {
|
||||||
"active": false
|
"active": false
|
||||||
|
|||||||
Reference in New Issue
Block a user