Skip to content

Commit

Permalink
Merge pull request #21 from hatoo/fix_dev_proxy
Browse files Browse the repository at this point in the history
fix dev_proxy
  • Loading branch information
hatoo authored Jun 22, 2024
2 parents f3fde64 + 6133e5c commit 1a92c95
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
@@ -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))

0 comments on commit 1a92c95

Please sign in to comment.