change auth token header!

Google api docs LIED!
This commit is contained in:
2026-04-20 08:06:12 +02:00
parent a3caa0ebfa
commit 479d2623e6

View File

@@ -17,12 +17,13 @@ fn get_live_id(channel: String) -> String {
}
pub fn auth_header(mut req: Request<()>) -> Result<Request<()>, Status> {
let token: MetadataValue<_> = "Bearer my-secret-token"
let oauth_token = "Yeah!".to_string();
let token: MetadataValue<_> = format!("Bearer {}", oauth_token)
.parse()
.expect("failed to parse token");
req.metadata_mut()
.insert("x-goog-api-key", token)
.insert("authorization", token)
.expect("WHAT");
Ok(req)
}