Hello Everyone hope you are going great i need help find what am i doing wrong. so basically i want my app to make some api call to a local server and it works great in development but when i try to bundle my app and launch it something happen.
the error is
thread 'main' panicked at src/lib.rs:36:10:
error while running tauri application: PluginInitialization("http", "Permission denied (os error 13)")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
but i try to add capabilities in capabilities/default.json:
{
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "default",
"description": "enables the default permissions",
"windows": [
"main"
],
"permissions": [
"core:default",
{
"identifier": "shell:allow-execute",
"allow": [
{
"name": "exec-sh",
"cmd": "sh",
"args": [
"-c",
{
"validator": "\\S+"
}
],
"sidecar": false
}
]
},
{
"identifier": "http:default",
"allow": [{ "url": "https://*.tauri.app" }, { "url": "https://localhost:3001" }, {"url": "https://127.0.0.1:3" }],
"deny": [{ "url": "https://private.tauri.app" }]
}
]
}
permission/http.toml :
[[permission]]
identifier = "allow-http"
description = "This enables the http command."
commands.allow = [
"allow-fetch",
"allow-fetch-cancel",
"allow-fetch-read-body",
"allow-fetch-send",
]
if someone can help me and explain why, i think I haven't understood the principle yet of the permission.
Thx