Describe your feature request
I would like an option in nuclei-templates to restrict redirects to the protocol it was initialized with. I have a situation where I want to follow redirects (x times) but not when its switching to another protocol.
How can I ensure that redirects are only on the same protocol (eg http or https) and not switching protocols?
Right now I use something like:
requests:
- method: GET
path:
- "http://{{Hostname}}/something"
- "https://{{Hostname}}/something"
To ensure I test both, both can redirect but only within their own protocol.
Describe the use case of the feature
Generic, many use cases thinkable.
Describe alternatives you've considered
requests:
- method: GET
path:
- "https://{{Hostname}}/something"
- method: GET
path:
- "http://{{Hostname}}/something"
But still no way to limit redirects to their own protocol.
Additional context
In addition to the existing redirect controles like:
redirects: true
host-redirects: true
max-redirects: 3
I propose:
redirects: true
host-redirects: true
max-redirects: 3
protocol-redirects: true # < Default true to stay backwards compatible
Then by using protocol-redirects: false this behavior could be disabled.
Describe your feature request
I would like an option in nuclei-templates to restrict redirects to the protocol it was initialized with. I have a situation where I want to follow redirects (x times) but not when its switching to another protocol.
How can I ensure that redirects are only on the same protocol (eg http or https) and not switching protocols?
Right now I use something like:
To ensure I test both, both can redirect but only within their own protocol.
Describe the use case of the feature
Generic, many use cases thinkable.
Describe alternatives you've considered
But still no way to limit redirects to their own protocol.
Additional context
In addition to the existing redirect controles like:
I propose:
Then by using
protocol-redirects: falsethis behavior could be disabled.