Skip to content

Commit b84762b

Browse files
authored
Merge pull request #4605 from NginxProxyManager/develop
v2.12.4
2 parents c5a319c + 953faea commit b84762b

File tree

23 files changed

+921
-488
lines changed

23 files changed

+921
-488
lines changed

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.12.3
1+
2.12.4

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<p align="center">
22
<img src="https://nginxproxymanager.com/github.png">
33
<br><br>
4-
<img src="https://img.shields.io/badge/version-2.12.3-green.svg?style=for-the-badge">
4+
<img src="https://img.shields.io/badge/version-2.12.4-green.svg?style=for-the-badge">
55
<a href="https://hub.docker.com/repository/docker/jc21/nginx-proxy-manager">
66
<img src="https://img.shields.io/docker/stars/jc21/nginx-proxy-manager.svg?style=for-the-badge">
77
</a>

backend/index.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
const schema = require('./schema');
44
const logger = require('./logger').global;
55

6+
const IP_RANGES_FETCH_ENABLED = process.env.IP_RANGES_FETCH_ENABLED !== 'false';
7+
68
async function appStart () {
79
const migrate = require('./migrate');
810
const setup = require('./setup');
@@ -13,7 +15,16 @@ async function appStart () {
1315
return migrate.latest()
1416
.then(setup)
1517
.then(schema.getCompiledSchema)
16-
.then(internalIpRanges.fetch)
18+
.then(() => {
19+
if (IP_RANGES_FETCH_ENABLED) {
20+
logger.info('IP Ranges fetch is enabled');
21+
return internalIpRanges.fetch().catch((err) => {
22+
logger.error('IP Ranges fetch failed, continuing anyway:', err.message);
23+
});
24+
} else {
25+
logger.info('IP Ranges fetch is disabled by environment variable');
26+
}
27+
})
1728
.then(() => {
1829
internalCertificate.initTimer();
1930
internalIpRanges.initTimer();

backend/internal/stream.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ const internalStream = {
369369
.where('is_deleted', 0)
370370
.groupBy('id')
371371
.allowGraph('[owner,certificate]')
372-
.orderByRaw('CAST(incoming_port AS INTEGER) ASC');
372+
.orderBy('incoming_port', 'ASC');
373373

374374
if (access_data.permission_visibility !== 'all') {
375375
query.andWhere('owner_user_id', access.token.getUserId(1));

backend/models/dead_host.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ Model.knex(db);
1212

1313
const boolFields = [
1414
'is_deleted',
15+
'ssl_forced',
16+
'http2_support',
1517
'enabled',
18+
'hsts_enabled',
19+
'hsts_subdomains',
1620
];
1721

1822
class DeadHost extends Model {

backend/models/stream.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ const now = require('./now_helper');
88
Model.knex(db);
99

1010
const boolFields = [
11-
'enabled',
1211
'is_deleted',
12+
'enabled',
1313
'tcp_forwarding',
1414
'udp_forwarding',
1515
];

backend/routes/users.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ router
181181
return internalUser.setPassword(res.locals.access, payload);
182182
})
183183
.then((result) => {
184-
res.status(201)
184+
res.status(200)
185185
.send(result);
186186
})
187187
.catch(next);
@@ -212,7 +212,7 @@ router
212212
return internalUser.setPermissions(res.locals.access, payload);
213213
})
214214
.then((result) => {
215-
res.status(201)
215+
res.status(200)
216216
.send(result);
217217
})
218218
.catch(next);
@@ -238,7 +238,7 @@ router
238238
.post((req, res, next) => {
239239
internalUser.loginAs(res.locals.access, {id: parseInt(req.params.user_id, 10)})
240240
.then((result) => {
241-
res.status(201)
241+
res.status(200)
242242
.send(result);
243243
})
244244
.catch(next);

backend/schema/components/proxy-host-object.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
"enabled",
2323
"locations",
2424
"hsts_enabled",
25-
"hsts_subdomains",
26-
"certificate"
25+
"hsts_subdomains"
2726
],
2827
"additionalProperties": false,
2928
"properties": {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"type": "array",
3-
"description": "Proxy Hosts list",
3+
"description": "Streams list",
44
"items": {
5-
"$ref": "./proxy-host-object.json"
5+
"$ref": "./stream-object.json"
66
}
77
}

backend/schema/swagger.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@
99
"url": "http://127.0.0.1:81/api"
1010
}
1111
],
12+
"components": {
13+
"securitySchemes": {
14+
"bearerAuth": {
15+
"type": "http",
16+
"scheme": "bearer",
17+
"bearerFormat": "JWT"
18+
}
19+
}
20+
},
1221
"paths": {
1322
"/": {
1423
"get": {

0 commit comments

Comments
 (0)