-
Notifications
You must be signed in to change notification settings - Fork 315
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
Add option to passthrough headers inside check() #1634
Comments
I'm not sure how to add the plugin tag |
Could you explain a bit more what would |
I think passing the headers by default is a good idea and will work with most use cases (github action, releases etc...), but I am using an S3 presigned url. Because it is signed, I can't have tauri add http headers because it breaks the signature. In my case, and probably most custom solutions for the updater component, it's best to give an option to modify the headers, or disable passing the headers to the "download" function Currently in the js client, we have no control over the http request. |
I see, we can add an optional second argument to allow modifying some options. |
@pacosw1 can you see if #1634 fixes this for you? you can clear the headers like this: update.download(() => {}, { headers: [] }) On a side note, there is two headers we set internally,
Let me know if these internal headers is causing a problem |
Hey, I will implement this and report back. Not sure about the other headers, but yeah, I cleared the headers in rust and it worked correctly. In that case it was probably my "Authorization" header causing the problem. Thanks for the fix! |
even if you clear the headers before calling
Thanks, please let me know how it goes |
I am currently implementing a dynamic server updater using the rc plugin. However, I can't have the update bundles hosted publicly so I implemented a system to store them in S3.
To cut to the chase, I create a presigned url and this is what is returned from my update endpoint for the app to download, however, since I add authentication headers, the plugin adds them to the request and it caused a 400 bad request from S3 side as the signature doesn't match and in my case, "Authorization" header can't be used since presigned url uses a different auth mechanism.
I worked around this by using the rust implementation to remove the headers from the update object, but this isn't possible in javascript.
It would be nice to have an option {"passthroughHeaders": bool} set to true by default, or some other way to control the headers when downloading the update.
The text was updated successfully, but these errors were encountered: