mirror of
https://github.com/d0zingcat/cors-anywhere.git
synced 2026-06-08 07:26:52 +00:00
Add redirectSameOrigin
Some clients try to use CORS Anywhere, even for same-origin requests... Add a new setting "redirectSameOrigin" to not waste server resources on proxying such requests. Fixes #42
This commit is contained in:
@@ -102,6 +102,24 @@ nock('https://example.com')
|
||||
.reply(200, 'Response from https://example.com')
|
||||
;
|
||||
|
||||
nock('http://example.com.com')
|
||||
.persist()
|
||||
.get('/')
|
||||
.reply(200, 'Response from example.com.com')
|
||||
;
|
||||
|
||||
nock('http://example.com:1234')
|
||||
.persist()
|
||||
.get('/')
|
||||
.reply(200, 'Response from example.com:1234')
|
||||
;
|
||||
|
||||
nock('http://prefix.example.com')
|
||||
.persist()
|
||||
.get('/')
|
||||
.reply(200, 'Response from prefix.example.com')
|
||||
;
|
||||
|
||||
echoheaders('http://example.com');
|
||||
echoheaders('http://example.com:1337');
|
||||
echoheaders('https://example.com');
|
||||
|
||||
Reference in New Issue
Block a user