Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 2d64d5b

Browse files
committed
Add support for self-signed ssl certificates
1 parent e68fb7a commit 2d64d5b

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,10 @@ token: abcdefghijklmnopqrst
485485
# defaults to false
486486
proxy: http://localhost:8080
487487

488+
# Don't check SSL certificate
489+
# defaults to false
490+
insecure: true
491+
488492
# Project
489493
# defaults to false
490494
project: namespace/projectname

src/include/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const defaults = {
1111
url: 'https://gitlab.com/api/v4',
1212
token: false,
1313
proxy: false,
14+
insecure: false,
1415
project: false,
1516
from: "1970-01-01",
1617
to: moment().format(),

src/models/base.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class base {
1919
this._perPage = this.config ? this.config.get('_perPage') : 100;
2020
this._parallel = this.config ? this.config.get('_parallel') : 4;
2121
this._proxy = this.config && this.config.get('proxy') ? this.config.get('proxy') : undefined;
22+
this._insecure = this.config && this.config.get('unsecure') ? this.config.get('unsecure') : false;
2223
}
2324

2425
/**
@@ -33,6 +34,7 @@ class base {
3334
return request.post(`${this.url}${path}`, {
3435
json: true,
3536
body: data,
37+
insecure: this._insecure,
3638
proxy: this._proxy,
3739
resolveWithFullResponse: true,
3840
headers: {
@@ -54,6 +56,7 @@ class base {
5456

5557
return request(`${this.url}${path}`, {
5658
json: true,
59+
insecure: this._insecure,
5760
proxy: this._proxy,
5861
resolveWithFullResponse: true,
5962
headers: {

0 commit comments

Comments
 (0)