@@ -18,7 +18,7 @@ use sha2::{Digest as _, Sha256};
1818use walkdir:: WalkDir ;
1919
2020use crate :: api:: { Api , CreateSnapshotResponse , ImageMetadata , SnapshotsManifest } ;
21- use crate :: config:: { Auth , Config } ;
21+ use crate :: config:: Config ;
2222use crate :: utils:: args:: ArgExt as _;
2323use crate :: utils:: build_vcs:: collect_git_metadata;
2424use crate :: utils:: ci:: is_ci;
@@ -336,22 +336,8 @@ fn upload_images(
336336 if let Some ( token) = options. objectstore . auth_token {
337337 builder = builder. token ( token. expose_secret ( ) . to_owned ( ) ) ;
338338 }
339- let builder = builder;
340-
341- let sentry_token = match authenticated_api. auth ( ) {
342- Auth :: Token ( token) => token. raw ( ) . expose_secret ( ) . to_owned ( ) ,
343- } ;
344- let sentry_token = format ! ( "Bearer {sentry_token}" )
345- . parse ( )
346- // Ignore original error to avoid leaking the token (even though it's invalid)
347- . map_err ( |_| anyhow:: anyhow!( "Invalid auth token" ) ) ?;
348339 let client = builder
349- . configure_reqwest ( |r| {
350- let mut headers = http:: HeaderMap :: new ( ) ;
351- headers. insert ( http:: header:: AUTHORIZATION , sentry_token) ;
352- r. connect_timeout ( Duration :: from_secs ( 10 ) )
353- . default_headers ( headers)
354- } )
340+ . configure_reqwest ( |r| r. connect_timeout ( Duration :: from_secs ( 10 ) ) )
355341 . build ( ) ?;
356342
357343 let scopes = options. objectstore . scopes ;
0 commit comments