Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for redirectCode (0.12 sec)

  1. pkg/config/validation/validation.go

    		return errors.New("redirect must specify URI, authority, scheme, or port")
    	}
    
    	if redirect.RedirectCode != 0 {
    		if redirect.RedirectCode < 300 || redirect.RedirectCode > 399 {
    			return fmt.Errorf("%d is not a valid redirect code, must be 3xx", redirect.RedirectCode)
    		}
    	}
    	if redirect.Scheme != "" && redirect.Scheme != "http" && redirect.Scheme != "https" {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jun 12 04:03:33 UTC 2024
    - 107.2K bytes
    - Viewed (0)
  2. pkg/config/validation/validation_test.go

    			redirect: &networking.HTTPRedirect{
    				Uri:          "t",
    				Authority:    "",
    				RedirectCode: 299,
    			},
    			valid: false,
    		},
    		{
    			name: "too large redirect code",
    			redirect: &networking.HTTPRedirect{
    				Uri:          "t",
    				Authority:    "",
    				RedirectCode: 400,
    			},
    			valid: false,
    		},
    		{
    			name: "empty authority",
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 30 03:11:45 UTC 2024
    - 196K bytes
    - Viewed (0)
Back to top