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": {

backend/yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -492,9 +492,9 @@ boxen@^4.2.0:
492492
widest-line "^3.1.0"
493493

494494
brace-expansion@^1.1.7:
495-
version "1.1.11"
496-
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
497-
integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
495+
version "1.1.12"
496+
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.12.tgz#ab9b454466e5a8cc3a187beaad580412a9c5b843"
497+
integrity sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==
498498
dependencies:
499499
balanced-match "^1.0.0"
500500
concat-map "0.0.1"

docker/docker-compose.ci.mysql.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ services:
1818
MYSQL_DATABASE: 'npm'
1919
MYSQL_USER: 'npm'
2020
MYSQL_PASSWORD: 'npmpass'
21+
MARIADB_AUTO_UPGRADE: '1'
2122
volumes:
2223
- mysql_vol:/var/lib/mysql
2324
networks:

docker/rootfs/etc/s6-overlay/s6-rc.d/prepare/30-ownership.sh

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@ chown -R "$PUID:$PGID" /etc/nginx/nginx
2323
chown -R "$PUID:$PGID" /etc/nginx/nginx.conf
2424
chown -R "$PUID:$PGID" /etc/nginx/conf.d
2525

26-
# Prevents errors when installing python certbot plugins when non-root
27-
chown "$PUID:$PGID" /opt/certbot /opt/certbot/bin
28-
find /opt/certbot/lib/python*/site-packages -not -user "$PUID" -execdir chown "$PUID:$PGID" {} \+
26+
# Certbot directories - optimized approach
27+
CERT_INIT_FLAG="/opt/certbot/.ownership_initialized"
28+
29+
if [ ! -f "$CERT_INIT_FLAG" ]; then
30+
# Prevents errors when installing python certbot plugins when non-root
31+
chown "$PUID:$PGID" /opt/certbot /opt/certbot/bin
32+
33+
# Handle all site-packages directories efficiently
34+
find /opt/certbot/lib -type d -name "site-packages" | while read -r SITE_PACKAGES_DIR; do
35+
chown -R "$PUID:$PGID" "$SITE_PACKAGES_DIR"
36+
done
37+
38+
# Create a flag file to skip this step on subsequent runs
39+
touch "$CERT_INIT_FLAG"
40+
chown "$PUID:$PGID" "$CERT_INIT_FLAG"
41+
fi

docs/src/advanced-config/index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,14 @@ The easy fix is to add a Docker environment variable to the Nginx Proxy Manager
161161
DISABLE_IPV6: 'true'
162162
```
163163

164+
## Disabling IP Ranges Fetch
165+
166+
By default, NPM fetches IP ranges from CloudFront and Cloudflare during application startup. In environments with limited internet access or to speed up container startup, this fetch can be disabled:
167+
168+
```yml
169+
environment:
170+
IP_RANGES_FETCH_ENABLED: 'false'
171+
```
164172

165173
## Custom Nginx Configurations
166174

docs/src/setup/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ services:
2121
# Add any other Stream port you want to expose
2222
# - '21:21' # FTP
2323

24-
environment:
24+
#environment:
2525
# Uncomment this if you want to change the location of
2626
# the SQLite DB file within the container
2727
# DB_SQLITE_FILE: "/data/database.sqlite"

docs/yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,9 +1065,9 @@ vfile@^6.0.0:
10651065
vfile-message "^4.0.0"
10661066

10671067
vite@^5.4.8:
1068-
version "5.4.14"
1069-
resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.14.tgz#ff8255edb02134df180dcfca1916c37a6abe8408"
1070-
integrity sha512-EK5cY7Q1D8JNhSaPKVK4pwBFvaTmZxEnoKXLG/U9gmdDcihQGNzFlgIvaxezFR4glP1LsuiedwMBqCXH3wZccA==
1068+
version "5.4.19"
1069+
resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.19.tgz#20efd060410044b3ed555049418a5e7d1998f959"
1070+
integrity sha512-qO3aKv3HoQC8QKiNSTuUM1l9o/XX3+c+VTgLHbJWHZGeTPVAg2XwazI9UWzoxjIJCGCV2zU60uqMzjeLZuULqA==
10711071
dependencies:
10721072
esbuild "^0.21.3"
10731073
postcss "^8.4.43"

frontend/js/i18n/messages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
},
6161
"footer": {
6262
"fork-me": "Fork me on Github",
63-
"copy": "&copy; 2024 <a href=\"{url}\" target=\"_blank\">jc21.com</a>.",
63+
"copy": "&copy; 2025 <a href=\"{url}\" target=\"_blank\">jc21.com</a>.",
6464
"theme": "Theme by <a href=\"{url}\" target=\"_blank\">Tabler</a>"
6565
},
6666
"dashboard": {

frontend/scss/tabler-extra.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,4 +167,5 @@ $pink: #f66d9b;
167167

168168
textarea.form-control.text-monospace {
169169
font-size: 12px;
170+
font-family: monospace;
170171
}

0 commit comments

Comments
 (0)