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) {
|
||||
const myURL = new URL(url);
|
||||
const hostname = myURL.hostname;
|
||||
tauriConfig.tauri.security.dangerousRemoteDomainIpcAccess[0].domain = hostname;
|
||||
const currentUrlConfig: DangerousRemoteDomainIpAccess = {
|
||||
domain: myURL.hostname,
|
||||
windows: ["pake"],
|
||||
enableTauriAPI: true,
|
||||
};
|
||||
tauriConfig.tauri.security.dangerousRemoteDomainIpcAccess = [currentUrlConfig];
|
||||
}
|
||||
|
||||
export async function mergeTauriConfig(
|
||||
|
||||
@@ -5,16 +5,7 @@
|
||||
},
|
||||
"tauri": {
|
||||
"security": {
|
||||
"csp": null,
|
||||
"dangerousRemoteDomainIpcAccess": [
|
||||
{
|
||||
"domain": "weread.qq.com",
|
||||
"windows": [
|
||||
"pake"
|
||||
],
|
||||
"enableTauriAPI": true
|
||||
}
|
||||
]
|
||||
"csp": null
|
||||
},
|
||||
"updater": {
|
||||
"active": false
|
||||
|
||||
Reference in New Issue
Block a user