Reject invalid redirects

Fixes #234.
This commit is contained in:
Rob Wu
2020-05-06 23:25:17 +02:00
parent 0a3b8e965f
commit a9e06a9dab
3 changed files with 23 additions and 2 deletions

View File

@@ -114,6 +114,11 @@ nock('http://example.com')
.get('/redirectwithoutlocation')
.reply(302, 'maybe found')
.get('/redirectinvalidlocation')
.reply(302, 'redirecting to junk...', {
Location: 'http:///',
})
.get('/proxyerror')
.replyWithError('throw node')
;