mirror of
https://github.com/certd/certd.git
synced 2026-05-18 06:17:31 +08:00
🔱: [acme] sync upgrade with 3 commits [trident-sync]
Add https-01 challenge test server support Inject CoreDNS into resolv.conf while testing, remove interceptor hack
This commit is contained in:
@@ -50,11 +50,20 @@ async function addHttp01ChallengeResponse(token, content) {
|
||||
return request('add-http01', { token, content });
|
||||
}
|
||||
|
||||
async function addHttps01ChallengeResponse(token, content, targetHostname, targetPort = 443) {
|
||||
await addHttp01ChallengeResponse(token, content);
|
||||
return request('add-redirect', {
|
||||
path: `/.well-known/acme-challenge/${token}`,
|
||||
targetURL: `https://${targetHostname}:${targetPort}/.well-known/acme-challenge/${token}`
|
||||
});
|
||||
}
|
||||
|
||||
async function addDns01ChallengeResponse(host, value) {
|
||||
return request('set-txt', { host, value });
|
||||
}
|
||||
|
||||
exports.addHttp01ChallengeResponse = addHttp01ChallengeResponse;
|
||||
exports.addHttps01ChallengeResponse = addHttps01ChallengeResponse;
|
||||
exports.addDns01ChallengeResponse = addDns01ChallengeResponse;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user