mirror of
https://github.com/jc21/nginx-proxy-manager.git
synced 2024-08-30 18:22:48 +00:00
Adds logs to backend when testing http challenge
This commit is contained in:
parent
9efe6cfb39
commit
38ec0f9f95
@ -1181,16 +1181,20 @@ const internalCertificate = {
|
|||||||
// Server exists and has responded with the correct data
|
// Server exists and has responded with the correct data
|
||||||
return 'ok';
|
return 'ok';
|
||||||
} else if (`${result.responsecode}` === '200') {
|
} else if (`${result.responsecode}` === '200') {
|
||||||
// Server exists and has responded with the correct data
|
// Server exists but has responded with wrong data
|
||||||
|
logger.info(`HTTP challenge test failed for domain ${domain} because of invalid returned data:`, result.htmlresponse);
|
||||||
return 'wrong-data';
|
return 'wrong-data';
|
||||||
} else if (`${result.responsecode}` === '404') {
|
} else if (`${result.responsecode}` === '404') {
|
||||||
// Server exists but responded with a 404
|
// Server exists but responded with a 404
|
||||||
|
logger.info(`HTTP challenge test failed for domain ${domain} because code 404 was returned`);
|
||||||
return '404';
|
return '404';
|
||||||
} else if (`${result.responsecode}` === '0' || (typeof result.reason === 'string' && result.reason.toLowerCase() === 'host unavailable')) {
|
} else if (`${result.responsecode}` === '0' || (typeof result.reason === 'string' && result.reason.toLowerCase() === 'host unavailable')) {
|
||||||
// Server does not exist at domain
|
// Server does not exist at domain
|
||||||
|
logger.info(`HTTP challenge test failed for domain ${domain} the host was not found`);
|
||||||
return 'no-host';
|
return 'no-host';
|
||||||
} else {
|
} else {
|
||||||
// Other errors
|
// Other errors
|
||||||
|
logger.info(`HTTP challenge test failed for domain ${domain} because code ${result.responsecode} was returned`);
|
||||||
return `other:${result.responsecode}`;
|
return `other:${result.responsecode}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user