Skip to content

Commit

Permalink
add channel support 20
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Novak committed Mar 5, 2024
1 parent b88fca8 commit d6e9866
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ fn main() -> Result<(), Error> {
std::env::var("FASTLY_SERVICE_VERSION").unwrap_or_else(|_| String::new())
);
let req = Request::from_client();
let req2 = Request::from_client();

// Request is a stream request - from client, or from fanout
if req.get_path().starts_with("/stream/") {
let channel = req.get_header_str("FANOUT").unwrap_or("test");
let channel = req2.get_header_str("FANOUT").unwrap_or("test");
return Ok(if req.get_header_str("Grip-Sig").is_some() {
// Request is from Fanout

Expand Down

0 comments on commit d6e9866

Please sign in to comment.