update example
This commit is contained in:
parent
f088d0326d
commit
ffbcc433b3
|
@ -42,12 +42,12 @@ server.on('listening', function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
function myApproveDomains(opts) {
|
function myApproveDomains(opts) {
|
||||||
console.log('sni:', opts.domains[0]);
|
console.log('sni:', opts.domain);
|
||||||
|
|
||||||
// must be 'example.com' or start with 'example.com'
|
// must be 'example.com' or start with 'example.com'
|
||||||
if ('example.com' !== opts.domains[0]
|
if ('example.com' !== opts.domain
|
||||||
&& 'example.com' !== opts.domains[0].split('.').slice(1).join('.')) {
|
&& 'example.com' !== opts.domain.split('.').slice(1).join('.')) {
|
||||||
return Promise.reject(new Error("we don't serve your kind here: " + opts.domains[0]));
|
return Promise.reject(new Error("we don't serve your kind here: " + opts.domain));
|
||||||
}
|
}
|
||||||
|
|
||||||
// the primary domain for the cert
|
// the primary domain for the cert
|
||||||
|
|
Loading…
Reference in New Issue