1
1
Fixes for the server reachability test.
2
- - Do not apply HTTPs redirection for challenge used by the test.
3
- - Set the `User-Agent` to avoid 403 answer from site24x7.com.
4
- - Handle JSON parsing failure of the received body.
5
- - Better handling of different error cases.
6
- --- a/backend/internal/certificate.js 2023-12-11 15:50:27.947677992 -0500
7
- +++ b/backend/internal/certificate.js 2023-12-11 16:00:10.953034576 -0500
8
- @@ -1163,6 +1163,7 @@
2
+ - Do not apply HTTPs redirection for challenge used by the test.
3
+ - Set the `User-Agent` to avoid 403 answer from site24x7.com.
4
+ - Handle JSON parsing failure of the received body.
5
+ - Better handling of different error cases.
6
+
7
+ diff --git a/backend/internal/certificate.js b/backend/internal/certificate.js
8
+ index f68ef30..ecbb4bf 100644
9
+ --- a/backend/internal/certificate.js
10
+ +++ b/backend/internal/certificate.js
11
+ @@ -1167,6 +1167,7 @@ const internalCertificate = {
9
12
const options = {
10
13
method: 'POST',
11
14
headers: {
12
15
+ 'User-Agent': 'Mozilla/5.0',
13
16
'Content-Type': 'application/x-www-form-urlencoded',
14
17
'Content-Length': Buffer.byteLength(formBody)
15
18
}
16
- @@ -1175 ,12 +1176 ,22 @@
19
+ @@ -1179 ,12 +1180 ,22 @@ const internalCertificate = {
17
20
18
21
res.on('data', (chunk) => responseBody = responseBody + chunk);
19
22
res.on('end', function () {
@@ -40,7 +43,7 @@ Fixes for the server reachability test.
40
43
});
41
44
});
42
45
43
- @@ -1194 ,6 +1205 ,9 @@
46
+ @@ -1198 ,6 +1209 ,9 @@ const internalCertificate = {
44
47
if (!result) {
45
48
// Some error occurred while trying to get the data
46
49
return 'failed';
@@ -50,11 +53,14 @@ Fixes for the server reachability test.
50
53
} else if (`${result.responsecode}` === '200' && result.htmlresponse === 'Success') {
51
54
// Server exists and has responded with the correct data
52
55
return 'ok';
53
- --- a/docker/rootfs/etc/nginx/conf.d/include/force-ssl.conf 2023-12-13 08:00:40.674589907 -0500
54
- +++ b/docker/rootfs/etc/nginx/conf.d/include/force-ssl.conf 2023-12-13 08:05:26.611112675 -0500
55
- @@ -1,3 +1,9 @@
56
+ diff --git a/docker/rootfs/etc/nginx/conf.d/include/force-ssl.conf b/docker/rootfs/etc/nginx/conf.d/include/force-ssl.conf
57
+ index 15f0d28..aa52f33 100644
58
+ --- a/docker/rootfs/etc/nginx/conf.d/include/force-ssl.conf
59
+ +++ b/docker/rootfs/etc/nginx/conf.d/include/force-ssl.conf
60
+ @@ -1,3 +1,10 @@
61
+ + set $test "";
56
62
if ($scheme = "http") {
57
- + set $test H ;
63
+ + set $test "H" ;
58
64
+ }
59
65
+ if ($request_uri = /.well-known/acme-challenge/test-challenge) {
60
66
+ set $test "${test}T";
0 commit comments