diff --git a/index.js b/index.js index b6487a2..65ff851 100644 --- a/index.js +++ b/index.js @@ -521,8 +521,13 @@ Greenlock.create = function (gl) { if (req.socket && 'string' === typeof req.socket.servername) { if (safehost && (safehost !== req.socket.servername.toLowerCase())) { res.statusCode = 400; - res.end("Don't be frontin', yo!" - + " TLS SNI '" + req.socket.servername.toLowerCase() + "' does not match 'Host: " + safehost + "'"); + res.setHeader('Content-Type', 'text/html; charset=utf-8'); + res.end( + "
This connection was secured using TLS/SSL for '" + req.socket.servername.toLowerCase() + "'
" + + "The HTTP request specified 'Host: " + safehost + "', which is (obviously) different.
" + + "Because this looks like a domain fronting attack, the connection has been terminated.
" + ); return; } } else if (safehost && !gl.middleware.sanitizeHost._skip_fronting_check) {