We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ed164f commit 83dd841Copy full SHA for 83dd841
src/index.ts
@@ -69,7 +69,7 @@ type IReturnData<O extends Options = {}> = (IDomainData) & (IReturnCa<O>) & (IRe
69
export async function certificateFor<O extends Options>(requestedDomains: string | string[], options: O = {} as O): Promise<IReturnData<O>> {
70
const domains = Array.isArray(requestedDomains) ? requestedDomains : [requestedDomains];
71
domains.forEach((domain) => {
72
- if (!isValidDomain(domain, { subdomain: false, wildcard: false, allowUnicode: true, topLevel: false })) {
+ if (domain !== "localhost" && !isValidDomain(domain, { subdomain: true, wildcard: false, allowUnicode: true, topLevel: false })) {
73
throw new Error(`"${domain}" is not a valid domain name.`);
74
}
75
});
0 commit comments