Skip to content

Commit 9efe6cf

Browse files
author
Julian Reinhardt
committed
Minor fixes
1 parent c86a1a5 commit 9efe6cf

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

backend/internal/certificate.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,10 +1180,13 @@ const internalCertificate = {
11801180
} else if (`${result.responsecode}` === '200' && result.htmlresponse === 'Success') {
11811181
// Server exists and has responded with the correct data
11821182
return 'ok';
1183+
} else if (`${result.responsecode}` === '200') {
1184+
// Server exists and has responded with the correct data
1185+
return 'wrong-data';
11831186
} else if (`${result.responsecode}` === '404') {
11841187
// Server exists but responded with a 404
11851188
return '404';
1186-
} else if (`${result.responsecode}` === '0' || result.reason.toLowerCase() === 'host unavailable') {
1189+
} else if (`${result.responsecode}` === '0' || (typeof result.reason === 'string' && result.reason.toLowerCase() === 'host unavailable')) {
11871190
// Server does not exist at domain
11881191
return 'no-host';
11891192
} else {

frontend/js/app/nginx/certificates/test.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<%= i18n('str', 'please-wait') %>
88
</div>
99
<div class="alert alert-danger error" role="alert"></div>
10-
<div class="alert alert-danger success" role="alert"></div>
10+
<div class="alert alert-success success" role="alert"></div>
1111
</div>
1212
<div class="modal-footer">
1313
<button type="button" class="btn btn-secondary cancel" disabled><%- i18n('str', 'close') %></button>

frontend/js/app/nginx/certificates/test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ module.exports = Mn.View.extend({
4545
text += `<p><strong>${domain}:</strong> ${App.i18n('certificates', 'reachability-failed-to-check')}</p>`;
4646
} else if (status === '404') {
4747
text += `<p><strong>${domain}:</strong> ${App.i18n('certificates', 'reachability-404')}</p>`;
48+
} else if (status === 'wrong-data') {
49+
text += `<p><strong>${domain}:</strong> ${App.i18n('certificates', 'reachability-wrong-data')}</p>`;
4850
} else if (status.startsWith('other:')) {
4951
const code = status.substring(6);
5052
text += `<p><strong>${domain}:</strong> ${App.i18n('certificates', 'reachability-other', {code})}</p>`;

frontend/js/i18n/messages.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@
196196
"reachability-ok": "Your server is reachable and creating certificates should be possible.",
197197
"reachability-404": "There is a server found at this domain but it does not seem to be Nginx Proxy Manager. Please make sure your domain points to the IP where your NPM instance is running.",
198198
"reachability-not-resolved": "There is no server available at this domain. Please make sure your domain exists and points to the IP where your NPM instance is running and if necessary port 80 is forwarded in your router.",
199+
"reachability-wrong-data": "There is a server found at this domain but it returned an unexpected data. Is it the NPM server? Please make sure your domain points to the IP where your NPM instance is running.",
199200
"reachability-other": "There is a server found at this domain but it returned an unexpected status code {code}. Is it the NPM server? Please make sure your domain points to the IP where your NPM instance is running.",
200201
"download": "Download",
201202
"renew-title": "Renew Let'sEncrypt Certificate"

0 commit comments

Comments
 (0)