-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat] Able to set request headers for tauri downloader #3896
Comments
Amazing thank you sm @lucasfernog ✨ Is there any documentation on how to use this? |
@ghostdevv add this to your Cargo.toml:
You'll need to remove If you're using the Tauri CLI, you need to either build it from source or use Cargo directly.
cargo install --git https://github.com/tauri-apps/tauri tauri-cli
cargo tauri dev
cargo tauri build
git clone https://github.com/tauri-apps/tauri
cd tauri/tooling/cli/node
yarn
yarn build
node /path/to/tauri/tooling/cli/node/tauri.js dev
node /path/to/tauri/tooling/cli/node/tauri.js build
If you're using the Tauri API, you might need to use the next version.
{
"dependencies": {
"@tauri-apps/api": "/path/to/tauri/tooling/api/dist"
}
} |
Awesome, but how do I use this new feature? 🤔 |
You'll need to manually run the updater: fn main() {
tauri::Builder::default().setup(|app| {
let handle = app.handle();
tauri::async_runtime::spawn(async move {
match handle
.updater()
.header("your-header", "value")
.unwrap()
.check()
.await
{
Ok(update) => {
update.download_and_install().await; // TODO: handle possible error
}
Err(e) => {
println!("ERROR: {}", e);
}
}
});
Ok(())
});
} |
Describe the problem
Currently I am using this cloudflare worker to do the uploader endpoint, and it works perfectly. However tauri won't be able to actually download the files as they are on a private github repo
Describe the solution you'd like
Be able to provide custom headers into the tauri uploader config
Alternatives considered
Adding a proxy on that cloudflare worker
Additional context
No response
The text was updated successfully, but these errors were encountered: