Skip to content

Commit d8b093d

Browse files
committed
Add Tauri v2 shell:allow-open capability
1 parent 48c2b5a commit d8b093d

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "../gen/schemas/desktop-schema.json",
3+
"identifier": "default",
4+
"description": "Default capability for all windows, allows core and shell open permissions.",
5+
"windows": ["*"],
6+
"permissions": [
7+
"core:default",
8+
"shell:allow-open"
9+
]
10+
}

src-tauri/tauri.conf.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
},
1111
"app": {
1212
"security": {
13-
"csp": null
13+
"csp": null,
14+
"capabilities": [
15+
{ "path": "./capabilities/default.json" }
16+
]
1417
},
1518
"windows": [
1619
{
@@ -29,7 +32,9 @@
2932
},
3033
"plugins": {
3134
"shell": {
32-
"open": true
35+
"open": {
36+
"allowlist": ["^https://.*"]
37+
}
3338
}
3439
}
3540
}

0 commit comments

Comments
 (0)