dont follow more than 2 redirects for URL previews for security reasons
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
fb2eba722d
commit
8e6d52e7dd
2 changed files with 40 additions and 1 deletions
|
@ -432,7 +432,7 @@ fn url_request_allowed(addr: &IpAddr) -> bool {
|
|||
}
|
||||
|
||||
async fn request_url_preview(url: &str) -> Result<UrlPreviewData> {
|
||||
let client = services().globals.default_client();
|
||||
let client = services().globals.url_preview_client();
|
||||
let response = client.head(url).send().await?;
|
||||
|
||||
if !response
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue