fix: actually check redirect urls
kind of the whole point of this thing.
This commit is contained in:
@@ -293,7 +293,10 @@ impl Request {
|
|||||||
if let Some(location) = response.headers().get("location") {
|
if let Some(location) = response.headers().get("location") {
|
||||||
let location = location.to_str().map_err(|_| create_error!(ProxyError))?;
|
let location = location.to_str().map_err(|_| create_error!(ProxyError))?;
|
||||||
url = Url::from_str(location).to_internal_error()?;
|
url = Url::from_str(location).to_internal_error()?;
|
||||||
continue;
|
|
||||||
|
if !Request::url_is_blacklisted(&url).await? {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return Err(create_error!(ProxyError));
|
return Err(create_error!(ProxyError));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user