Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Perhaps something like, if the redirected url is within the same domain, then follow otherwise don't. Another option might be to use conditions.
Comments
Comment #1
Deciphered CreditAttribution: Deciphered commentedI've implemented the 'max_redirects' parameter in #2149329: Expose entire functionality of drupal_http_request()., not exactly the same thing but similar.