v0.9.1: whitspace fixes
This commit is contained in:
parent
2b4b714126
commit
cfb335902c
24
README.md
24
README.md
|
@ -59,10 +59,10 @@ part of the name of the file storage path where the certificate will be saved (o
|
|||
function approveDomains(opts, certs, cb) {
|
||||
// foo.example.com => *.example.com
|
||||
var wild = '*.' + opts.domain.split('.').slice(1).join('.');
|
||||
if ('*.example.com' !== wild) { cb(new Error(opts.domain + " is not allowed")); }
|
||||
if ('*.example.com' !== wild) { cb(new Error(opts.domain + " is not allowed")); }
|
||||
|
||||
opts.subject = '*.example.com';
|
||||
opts.domains = ['*.example.com'];
|
||||
opts.subject = '*.example.com';
|
||||
opts.domains = ['*.example.com'];
|
||||
|
||||
cb({ options: opts, certs: certs });
|
||||
}
|
||||
|
@ -73,10 +73,10 @@ function approveDomains(opts, certs, cb) {
|
|||
```js
|
||||
function approveDomains(opts, certs, cb) {
|
||||
var related = getRelated(opts.domain);
|
||||
if (!related) { cb(new Error(opts.domain + " is not allowed")); };
|
||||
if (!related) { cb(new Error(opts.domain + " is not allowed")); };
|
||||
|
||||
opts.subject = related.subject;
|
||||
opts.domains = related.domains;
|
||||
opts.subject = related.subject;
|
||||
opts.domains = related.domains;
|
||||
|
||||
cb({ options: opts, certs: certs });
|
||||
}
|
||||
|
@ -86,13 +86,13 @@ function approveDomains(opts, certs, cb) {
|
|||
function getRelated(domain) {
|
||||
var related;
|
||||
var wild = '*.' + domain.split('.').slice(1).join('.');
|
||||
if (Object.keys(allAllowedDomains).some(function (k) {
|
||||
return allAllowedDomains[k].some(function (name) {
|
||||
if (domain === name || wild === name) {
|
||||
if (Object.keys(allAllowedDomains).some(function (k) {
|
||||
return allAllowedDomains[k].some(function (name) {
|
||||
if (domain === name || wild === name) {
|
||||
related = { subject: k, altnames: allAllowedDomains[k] };
|
||||
return true;
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
});
|
||||
})) {
|
||||
return related;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "le-store-fs",
|
||||
"version": "0.9.0",
|
||||
"version": "0.9.1",
|
||||
"description": "A file-based certificate store for greenlock that supports wildcards.",
|
||||
"homepage": "https://git.coolaj86.com/coolaj86/le-store-fs.js",
|
||||
"main": "index.js",
|
||||
|
|
Loading…
Reference in New Issue