dep updates/remove useless files/fix reachability test?

Update zoeyvid/nginx-quic Docker tag to v110
Update zoeyvid/nginx-quic Docker tag to v109
Update zoeyvid/nginx-quic Docker tag to v107
Update dependency liquidjs to v10.7.1
Update dependency eslint to v8.38.0
remove empty folder
Delete Hosts.spec.js

Fix for SSL certificate error #2011 by @S-T-3-V-3
 - Keepalive, User Agent + Accept headers
 - Catch added for failed JSON parsing
 - More accurate errors displayed to user

Signed-off-by: Zoey <zoey@z0ey.de>
This commit is contained in:
renovate[bot]
2023-04-08 00:19:02 +00:00
committed by Zoey
parent 0d9da2b72a
commit ec29d4ce8d
8 changed files with 16 additions and 61 deletions

View File

@@ -30,7 +30,7 @@ RUN apk add --no-cache ca-certificates nodejs-current yarn && \
yarn cache clean --all
FROM zoeyvid/nginx-quic:106
FROM zoeyvid/nginx-quic:110
RUN apk add --no-cache ca-certificates tzdata \
nodejs-current \
openssl apache2-utils \

View File

@@ -70,6 +70,7 @@ so that the barrier for entry here is low.
## Soon
- disabling IPv4/IPv6 ([1](https://github.com/NginxProxyManager/nginx-proxy-manager/blob/develop/docker/rootfs/etc/s6-overlay/s6-rc.d/prepare/40-dynamic.sh) / [2](https://github.com/NginxProxyManager/nginx-proxy-manager/blob/develop/docker/rootfs/etc/s6-overlay/s6-rc.d/prepare/50-ipv6.sh) / nginx templates (nginx.js lines 200-300))
- custom IP-Bindings in nginx/backend to allow multiple instances in host network mode
- support changing the PUID/PGID (maybe)
- more

View File

@@ -1 +0,0 @@

View File

@@ -1152,7 +1152,10 @@ const internalCertificate = {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Content-Length': Buffer.byteLength(formBody)
'Content-Length': Buffer.byteLength(formBody),
'Connection': 'keep-alive',
'User-Agent': 'Nginx Proxy Manager',
'Accept': '*/*'
}
};
@@ -1163,12 +1166,16 @@ const internalCertificate = {
res.on('data', (chunk) => responseBody = responseBody + chunk);
res.on('end', function () {
const parsedBody = JSON.parse(responseBody + '');
if (res.statusCode !== 200) {
try {
const parsedBody = JSON.parse(responseBody + '');
resolve(parsedBody);
}
catch (error) {
logger.warn('Error');
logger.warn(`Status Code: ${res.statusCode}`);
logger.warn(`Failed to test HTTP challenge for domain ${domain}`, res);
resolve(undefined);
}
resolve(parsedBody);
});
});

View File

@@ -16,7 +16,7 @@
"gravatar": "1.8.2",
"jsonwebtoken": "9.0.0",
"knex": "2.4.2",
"liquidjs": "10.7.0",
"liquidjs": "10.7.1",
"lodash": "4.17.21",
"moment": "2.29.4",
"mysql": "2.18.1",
@@ -30,7 +30,7 @@
"author": "Jamie Curnow <jc@jc21.com>",
"license": "MIT",
"devDependencies": {
"eslint": "8.37.0",
"eslint": "8.38.0",
"eslint-plugin-align-assignments": "1.1.2"
}
}

View File

@@ -18,7 +18,6 @@
<input type="text" name="domain_names" class="form-control" id="input-domains" value="<%- domain_names.join(',') %>" required>
<div class="text-blue"><i class="fe fe-alert-triangle"></i> <%- i18n('ssl', 'hosts-warning') %></div>
</div>
<!--
<div class="mb-3 test-domains-container">
<button type="button" class="btn btn-secondary test-domains col-sm-12"><%- i18n('certificates', 'test-reachability') %></button>
<div class="text-secondary small">
@@ -26,7 +25,6 @@
<%- i18n('certificates', 'reachability-info') %>
</div>
</div>
-->
</div>
<div class="col-sm-12 col-md-12">
<div class="form-group">

View File

@@ -42,15 +42,13 @@
<% if (provider === 'letsencrypt') { %>
<a href="#" class="renew dropdown-item"><i class="dropdown-icon fe fe-refresh-cw"></i> <%- i18n('certificates', 'force-renew') %></a>
<a href="#" class="download dropdown-item"><i class="dropdown-icon fe fe-download"></i> <%- i18n('certificates', 'download') %></a>
<!--
<% if (meta.dns_challenge === false) { %>
<a href="#" class="test dropdown-item"><i class="dropdown-icon fe fe-globe"></i> <%- i18n('certificates', 'test-reachability') %></a>
<% } %>
-->
<div class="dropdown-divider"></div>
<% } %>
<a href="#" class="delete dropdown-item"><i class="dropdown-icon fe fe-trash-2"></i> <%- i18n('str', 'delete') %></a>
</div>
</div>
</td>
<% } %>
<% } %>

View File

@@ -1,48 +0,0 @@
/// <reference types="Cypress" />
describe('Hosts endpoints', () => {
let token;
before(() => {
cy.getToken().then((tok) => {
token = tok;
});
});
it('Should be able to create a http host', function() {
cy.task('backendApiPost', {
token: token,
path: '/api/nginx/proxy-hosts',
data: {
domain_names: ['test.example.com'],
forward_scheme: 'http',
forward_host: '1.1.1.1',
forward_port: 80,
access_list_id: '0',
certificate_id: 0,
meta: {
letsencrypt_agree: false,
dns_challenge: false
},
advanced_config: '',
locations: [],
block_exploits: false,
caching_enabled: false,
allow_websocket_upgrade: false,
http2_support: false,
hsts_enabled: false,
hsts_subdomains: false,
ssl_forced: false
}
}).then((data) => {
cy.validateSwaggerSchema('post', 201, '/nginx/proxy-hosts', data);
expect(data).to.have.property('id');
expect(data.id).to.be.greaterThan(0);
expect(data).to.have.property('enabled');
expect(data.enabled).to.be.greaterThan(0);
expect(data).to.have.property('meta');
expect(typeof data.meta.nginx_online).to.be.equal('undefined');
});
});
});