Skip to content

Commit

Permalink
fix dev_proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
hatoo committed Jun 22, 2024
1 parent f3fde64 commit 6133e5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/dev_proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ async fn main() {
let original_url = req.uri().clone();

// Forward connection from http/https dev.example to http://127.0.0.1:3333
if req.uri().host() == Some("dev.example") {
if req.uri().host() == Some("dev.example") && req.method() != hyper::http::Method::CONNECT {
req.headers_mut().insert(
hyper::header::HOST,
hyper::header::HeaderValue::from_maybe_shared(format!("127.0.0.1:{}", port))
Expand Down

0 comments on commit 6133e5c

Please sign in to comment.