Skip to content

Redirect Plugin - max option #249

Description

@supun-io

Description
Looking at the docs/code, I don't see a way to define the number of maximum redirects to follow (similar to allow_redirects.max in Guzzle). This seems like a good security measure to have. There seems to be circulation redirects detection, but there could be a website redirecting from /1 -> /2 -> ... infinitely, causing essentially an infinite loop.

Example

new RedirectPlugin([
     'max' => 3,
]);

Additional context

I'm happy to work on the PR if the idea is accepted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions