Skip to content

Commit

Permalink
add channel support 9
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Novak committed Mar 5, 2024
1 parent 320a4c9 commit 6011102
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fn handle_fanout_ws(mut req: Request, chan: &str) -> Response {
}

fn handle_fanout(req: Request) -> Response {
let chan = req.get_header_str("FANOUT").unwrap_or("test")
let chan = req.get_header_str("FANOUT").unwrap_or("test");
match req.get_url().path() {
"/stream/long-poll" => fanout_util::grip_response("text/plain", "response", chan),
"/stream/plain" => fanout_util::grip_response("text/plain", "stream", chan),
Expand All @@ -53,7 +53,7 @@ fn main() -> Result<(), Error> {
if req.get_path().starts_with("/stream/") {
return Ok(if req.get_header_str("Grip-Sig").is_some() {
// Request is from Fanout

handle_fanout(req).send_to_client();
} else {
// Not from fanout, hand it off to Fanout to manage
Expand Down

0 comments on commit 6011102

Please sign in to comment.