Closed elanzini closed 1 year ago
I think you're looking for https://github.com/tauri-apps/tauri-plugin-localhost. tauri-invoke-http is just for changing the IPC, not the page origin.
Also, removing it from the default features, doesn't change anything. actually disabling the custom-protocol feature would effectively just tell tauri to use the devPath
instead of distDir
(which doesn't work because there is no localhost server).
Thanks again @FabianLars 🍻 - I have tried integrating the plugin you pointed to and ran into an issue - opened a ticket in the repository directly: https://github.com/tauri-apps/plugins-workspace/issues/155
Sorry for the confusion and thanks for the explanation - my knowledge is quite limited in this context - will close this issue.
Context
I recently opened this discussion. It sounded like this could fix my issues, since in my case I want the requests to have as
Origin
http://localhost
.What I tried
In my
Cargo.toml
, I removed thecustom-protocol
from thedefault
features.Before:
After:
And I have included the dependency as follows (also tried with branch
release
):But when I run
npm run tauri build
, the requests still havetauri://localhost
as theirOrigin
. Am I doing something wrong? Do I need to build with a specific flag?