Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
antSword
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HuangJunbo
antSword
Commits
05ecc277
Commit
05ecc277
authored
Jun 28, 2016
by
antoor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update ignoreHTTPS features
更新忽略HTTPS证书功能(测试
parent
4248aecb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
index.js
node_modules/superagent/lib/node/index.js
+5
-1
No files found.
node_modules/superagent/lib/node/index.js
View file @
05ecc277
...
@@ -596,6 +596,7 @@ Request.prototype.ca = function(cert){
...
@@ -596,6 +596,7 @@ Request.prototype.ca = function(cert){
*/
*/
Request
.
prototype
.
ignoreHTTPS
=
function
(
ignore
)
{
Request
.
prototype
.
ignoreHTTPS
=
function
(
ignore
)
{
this
.
_ignoreHttps
=
!
ignore
;
this
.
_ignoreHttps
=
!
ignore
;
process
.
env
.
NODE_TLS_REJECT_UNAUTHORIZED
=
ignore
?
'0'
:
undefined
;
return
this
;
return
this
;
};
};
...
@@ -625,7 +626,10 @@ Request.prototype.request = function(){
...
@@ -625,7 +626,10 @@ Request.prototype.request = function(){
options
.
host
=
url
.
hostname
;
options
.
host
=
url
.
hostname
;
options
.
ca
=
this
.
_ca
;
options
.
ca
=
this
.
_ca
;
options
.
agent
=
this
.
_agent
;
options
.
agent
=
this
.
_agent
;
options
.
requestCert
=
this
.
_ignoreHttps
;
// 卧槽,设置了这么多选项都没用,不过还好解决了,先留着吧。。
// options.requestCert = this._ignoreHttps;
// options.strictSSL = false;
// options.rejectUnhauthorized = false;
// initiate request
// initiate request
var
mod
=
exports
.
protocols
[
url
.
protocol
];
var
mod
=
exports
.
protocols
[
url
.
protocol
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment