node_runtime: Improve proxy mapping (#41807)
Closes #ISSUE More accurately map localhost to `127.0.0.1`. Previously we would lowercase and simply replace all instances of localhost inside of the URL string, meaning query parameters, username, password etc. could not contain the string `localhost` or contain uppercase letters without getting modified. Added a test ensuring the mapping logic works. The previous implementation would fail this new test. Release Notes: - Improved the behavior of mapping `localhost` to `127.0.0.1` when passing configured proxy urls to `node`
This commit is contained in:
@@ -16,7 +16,7 @@ use parking_lot::Mutex;
|
||||
#[cfg(feature = "test-support")]
|
||||
use std::fmt;
|
||||
use std::{any::type_name, sync::Arc};
|
||||
pub use url::Url;
|
||||
pub use url::{Host, Url};
|
||||
|
||||
#[derive(Default, Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub enum RedirectPolicy {
|
||||
|
||||
Reference in New Issue
Block a user