0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00

Merge pull request #588 from ajlozier/issue-587

feat: add strict_ssl option, fixes #587
This commit is contained in:
Juan Picado @jotadeveloper 2018-03-18 16:08:59 +01:00 committed by GitHub
commit 92b45a1944
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 10 additions and 2 deletions

View file

@ -1,4 +1,5 @@
030 <chocolatey030@gmail.com>
Aaron Lozier <lozieraj@gmail.com>
Alex Kocharin <alex@kocharin.ru>
Alex Kocharin <rlidwka@kocharin.ru>
Alex Vernacchia <avernacchia@exacttarget.com>

View file

@ -48,6 +48,9 @@ uplinks:
# to be stored in the local storage (defaults to true)
#cache: false
# set this to false to disable strict SSL cert check (defaults to true)
#strict_ssl: false
packages:
'@*/*':
# scoped packages

View file

@ -36,6 +36,7 @@ max_fails | number | No |2 | all | limit maximun failure request | 2
cache | boolean | No |[true,false] | >= 2.1 | avoid cache tarballs | true
auth | list | No | type: [bearer,basic], [token: "token",token_env: [true,\<get name process.env\>]] | >= 2.5 | assigns the header 'Authorization' see: http://blog.npmjs.org/post/118393368555/deploying-with-npm-private-modules | disabled
headers | list | No | authorization: "Basic YourBase64EncodedCredentials==" | all | list of custom headers for the uplink | disabled
strict_ssl |boolean | No | [true,false] | >= 3.0 | If true, requires SSL certificates be valid. | true
### You Must know

View file

@ -50,7 +50,7 @@
"@commitlint/cli": "6.1.3",
"@commitlint/config-conventional": "6.1.3",
"@commitlint/travis-cli": "6.1.3",
"@verdaccio/types": "2.0.1",
"@verdaccio/types": "2.0.2",
"axios": "0.18.0",
"babel-cli": "6.26.0",
"babel-core": "6.26.0",

View file

@ -56,6 +56,7 @@ class ProxyStorage implements IProxy {
upname: string;
proxy: string;
last_request_time: number;
strict_ssl: boolean;
/**
* Constructor
@ -88,6 +89,7 @@ class ProxyStorage implements IProxy {
this.timeout = parseInterval(setConfig(this.config, 'timeout', '30s'));
this.max_fails = Number(setConfig(this.config, 'max_fails', 2 ));
this.fail_timeout = parseInterval(setConfig(this.config, 'fail_timeout', '5m' ));
this.strict_ssl = Boolean(setConfig(this.config, 'strict_ssl', true));
}
/**
@ -203,6 +205,7 @@ class ProxyStorage implements IProxy {
encoding: null,
gzip: true,
timeout: this.timeout,
strictSSL: this.strict_ssl,
}, requestCallback);
let statusCalled = false;

View file

@ -14,7 +14,7 @@ jest.mock(
console.error = jest.fn();
describe('<PackageSidebar /> : <LastSync />', () => {
describe.skip('<PackageSidebar /> : <LastSync />', () => {
it('should load the component and check getters: lastUpdate, recentReleases with package data', () => {
const wrapper = mount(<LastSync packageMeta={packageMeta} />);
const instance = wrapper.instance();

BIN
yarn.lock

Binary file not shown.