Skip to content

Commit d23e0bc

Browse files
committed
feat(redirectionio): update default local network for trusted proxies
1 parent f051234 commit d23e0bc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/http/trusted_proxies.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,16 @@ pub struct TrustedProxies(Vec<AnyIpCidr>);
88
impl TrustedProxies {
99
pub fn new_local() -> Self {
1010
Self(vec![
11+
// IPV4 Loopback
12+
AnyIpCidr::from_str("127.0.0.0/8").unwrap(),
13+
// IPV4 Private Networks
1114
AnyIpCidr::from_str("10.0.0.0/8").unwrap(),
1215
AnyIpCidr::from_str("172.16.0.0/12").unwrap(),
1316
AnyIpCidr::from_str("192.168.0.0/16").unwrap(),
17+
// IPV6 Loopback
18+
AnyIpCidr::from_str("::1/128").unwrap(),
19+
// IPV6 Private network
20+
AnyIpCidr::from_str("fd00::/8").unwrap(),
1421
])
1522
}
1623

0 commit comments

Comments
 (0)