Skip to content

Commit ed67a11

Browse files
birmeWkkkkk
authored andcommittedJul 4, 2023
fix(#24): use relative URL for WHEP connection resource
1 parent 3e7b127 commit ed67a11

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed
 

‎src/routes/whep_handler.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ pub async fn subscribe(
4141
.await
4242
.context("Failed to receive a whip offer")?;
4343

44-
let whep_port = app_state.get_port();
45-
let url = format!("http://localhost:{}/channel/{}", whep_port, connection_id);
44+
let url = format!("/channel/{}", connection_id);
4645
tracing::info!("Receiving streaming from: {}", url);
4746

4847
Ok(HttpResponse::Created()

‎src/routes/whip_handler.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ pub async fn whip_request(
2929
.await
3030
.context("Failed to receive a whep offer")?;
3131

32-
let whep_port = app_state.get_port();
33-
let url = format!("http://localhost:{}/channel/{}", whep_port, connection_id);
32+
let url = format!("/channel/{}", connection_id);
3433
tracing::info!("Start streaming at: {}", url);
3534

3635
Ok(HttpResponse::Ok()

0 commit comments

Comments
 (0)
Please sign in to comment.