Replies: 1 comment
-
|
Your code works for me without any changes (with a different website url of course). I can see the headers on the server side in my test. btw, the unsafe-headers feature is only relevant for the plugin's JS api. Since you're using the plugin's |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using the tauri-plugin-http plugin to access a third-party OpenAPI endpoint. The API requires an
x-yunxiao-tokenrequest header for authentication. I have already configured the plugin in myCargo.tomlwith theunsafe-headersfeature enabled, but the custom header still does not work. The server keeps returning a 401 Unauthorized error.Cargo.tomlCapability JSON
{ "$schema": "../gen/schemas/desktop-schema.json", "identifier": "default", "description": "Capability for the main window", "windows": [ "main" ], "permissions": [ "core:default", "opener:default", "store:default", { "identifier": "http:default", "allow": [{ "url": "https://**" }] } ] }Rust Command (Full Debug Code)
Beta Was this translation helpful? Give feedback.
All reactions