Closed 151819880412 closed 5 days ago
I write it wrongly http://localhost:3000/test
"permissions": [
{
"identifier": "http:default",
"allow": [{
"url": "http://*:*"
}],
"deny": [{
"url": "http://*:*" <-----
}]
}
]
The urls in deny
will always be denied even if they are also in allow
. So in this case if you remove the deny entry it should work.
"permissions": [ { "identifier": "http:default", "allow": [{ "url": "http://*:*" }], "deny": [{ "url": "http://*:*" <----- }] } ]
即使中的 URL
deny
也位于 中,也始终会被拒绝allow
。因此,在这种情况下,如果您删除拒绝条目,它应该会起作用。
Thank you, it has been resolved
"permissions": [ { "identifier": "http:default", "allow": [{ "url": "http://*:*" }], "deny": [{ "url": "http://*:*" <----- }] } ]
The urls in
deny
will always be denied even if they are also inallow
. So in this case if you remove the deny entry it should work.
npm run tauri build How to set it up afterwards
1. I have set it up axios-->baseURL import axiosTauriApiAdapter from 'axios-tauri-api-adapter'; axios.create({ ...config, adapter: axiosTauriApiAdapter, })
2. import { fetch } from "@tauri-apps/plugin-http"; await fetch("http://localhost:8087/auth/login", { method: "POST", body: JSON.stringify({ username: "1", password: "1" }) })
neither of these methods works
Describe the bug
lib.rs
default.json
node test
const response = await fetch("http://localhost:3000/aaa", { method: "GET", }); error: "url not allowed on the configured scope: http://localhost:3000/aaa"
Reproduction
No response
Expected behavior
No response
Full
tauri info
outputStack trace
No response
Additional context
No response