Verify url after redirect
This commit is contained in:
parent
47bfde132c
commit
e07a9c0075
1 changed files with 1 additions and 0 deletions
|
|
@ -74,6 +74,7 @@ pub async fn fetch_object_http<T: Clone, Kind: DeserializeOwned>(
|
||||||
// Ensure id field matches final url after redirect
|
// Ensure id field matches final url after redirect
|
||||||
if res.object_id.as_ref() != Some(&res.url) {
|
if res.object_id.as_ref() != Some(&res.url) {
|
||||||
if let Some(res_object_id) = res.object_id {
|
if let Some(res_object_id) = res.object_id {
|
||||||
|
data.config.verify_url_valid(&res_object_id).await?;
|
||||||
// If id is different but still on the same domain, attempt to request object
|
// If id is different but still on the same domain, attempt to request object
|
||||||
// again from url in id field.
|
// again from url in id field.
|
||||||
if res_object_id.domain() == res.url.domain() {
|
if res_object_id.domain() == res.url.domain() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue