plugin/forward: crash if using https (#3817)

Signed-off-by: kadern0 <kaderno@gmail.com>
This commit is contained in:
kadern0 2020-04-10 04:26:28 +10:00 committed by GitHub
parent 08120096eb
commit e410760a49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -37,6 +37,7 @@ func TestSetup(t *testing.T) {
{"forward . 127.0.0.1 {\nblaatl\n}\n", true, "", nil, 0, options{hcRecursionDesired: true}, "unknown property"},
{`forward . ::1
forward com ::2`, true, "", nil, 0, options{hcRecursionDesired: true}, "plugin"},
{"forward . https://127.0.0.1 \n", true, ".", nil, 2, options{hcRecursionDesired: true}, "'https' is not supported as a destination protocol in forward: https://127.0.0.1"},
}
for i, test := range tests {