nuclei/v2/pkg/protocols/http/validate.go
Mzack9999 18f14b631c
Adding same host redirect support (#2655)
* simplifying test syntax

* adding same host redirect + refactoring redirect handling

* adding missing file

* adding support for template syntax

* adding integration test

* updating options

* fixing issue on same host redirect
2022-09-29 04:11:28 +05:30

16 lines
355 B
Go

package http
import "github.com/pkg/errors"
func (request *Request) validate() error {
if request.Race && request.ReqCondition {
return errors.New("'race' and 'req-condition' can't be used together")
}
if request.Redirects && request.HostRedirects {
return errors.New("'redirects' and 'host-redirects' can't be used together")
}
return nil
}