Compare commits
2 Commits
381560eef8
...
479d2623e6
| Author | SHA1 | Date | |
|---|---|---|---|
| 479d2623e6 | |||
| a3caa0ebfa |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
||||
/target
|
||||
/.direnv/
|
||||
|
||||
10
shell.nix
Normal file
10
shell.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
|
||||
with pkgs;
|
||||
|
||||
mkShell {
|
||||
buildInputs = [
|
||||
protobuf
|
||||
rustup
|
||||
];
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user