Skip to content

Commit 2578105

Browse files
authored
Merge pull request #4907 from NginxProxyManager/develop
v2.13.3
2 parents 64c5a86 + 39c9bbb commit 2578105

File tree

16 files changed

+163
-55
lines changed

16 files changed

+163
-55
lines changed

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.13.2
1+
2.13.3

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.13.2-green.svg?style=for-the-badge">
4+
<img src="https://img.shields.io/badge/version-2.13.3-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/certbot/dns-plugins.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@
370370
"leaseweb": {
371371
"name": "LeaseWeb",
372372
"package_name": "certbot-dns-leaseweb",
373-
"version": "~=1.0.1",
373+
"version": "~=1.0.3",
374374
"dependencies": "",
375375
"credentials": "dns_leaseweb_api_token = 01234556789",
376376
"full_plugin_name": "dns-leaseweb"
@@ -399,6 +399,14 @@
399399
"credentials": "dns_luadns_email = [email protected]\ndns_luadns_token = 0123456789abcdef0123456789abcdef",
400400
"full_plugin_name": "dns-luadns"
401401
},
402+
"mchost24": {
403+
"name": "MC-HOST24",
404+
"package_name": "certbot-dns-mchost24",
405+
"version": "",
406+
"dependencies": "",
407+
"credentials": "# Obtain API token using https://github.com/JoeJoeTV/mchost24-api-python\ndns_mchost24_api_token=<insert obtained API token here>",
408+
"full_plugin_name": "dns-mchost24"
409+
},
402410
"mijnhost": {
403411
"name": "mijn.host",
404412
"package_name": "certbot-dns-mijn-host",

backend/internal/nginx.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,11 @@ const internalNginx = {
216216
}
217217
}
218218

219+
// For redirection hosts, if the scheme is not http or https, set it to $scheme
220+
if (nice_host_type === "redirection_host" && ['http', 'https'].indexOf(host.forward_scheme.toLowerCase()) === -1) {
221+
host.forward_scheme = "$scheme";
222+
}
223+
219224
if (host.locations) {
220225
//logger.info ('host.locations = ' + JSON.stringify(host.locations, null, 2));
221226
origLocations = [].concat(host.locations);
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import { migrate as logger } from "../logger.js";
2+
3+
const migrateName = "redirect_auto_scheme";
4+
5+
/**
6+
* Migrate
7+
*
8+
* @see http://knexjs.org/#Schema
9+
*
10+
* @param {Object} knex
11+
* @returns {Promise}
12+
*/
13+
const up = (knex) => {
14+
logger.info(`[${migrateName}] Migrating Up...`);
15+
16+
return knex.schema
17+
.table("redirection_host", async (table) => {
18+
// change the column default from $scheme to auto
19+
await table.string("forward_scheme").notNull().defaultTo("auto").alter();
20+
await knex('redirection_host')
21+
.where('forward_scheme', '$scheme')
22+
.update({ forward_scheme: 'auto' });
23+
})
24+
.then(() => {
25+
logger.info(`[${migrateName}] redirection_host Table altered`);
26+
});
27+
};
28+
29+
/**
30+
* Undo Migrate
31+
*
32+
* @param {Object} knex
33+
* @returns {Promise}
34+
*/
35+
const down = (knex) => {
36+
logger.info(`[${migrateName}] Migrating Down...`);
37+
38+
return knex.schema
39+
.table("redirection_host", async (table) => {
40+
await table.string("forward_scheme").notNull().defaultTo("$scheme").alter();
41+
await knex('redirection_host')
42+
.where('forward_scheme', 'auto')
43+
.update({ forward_scheme: '$scheme' });
44+
})
45+
.then(() => {
46+
logger.info(`[${migrateName}] redirection_host Table altered`);
47+
});
48+
};
49+
50+
export { up, down };

backend/setup.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const setupDefaultUser = async () => {
3737

3838
const data = {
3939
is_deleted: 0,
40-
email: email,
40+
email: initialAdminEmail,
4141
name: "Administrator",
4242
nickname: "Admin",
4343
avatar: "",
@@ -53,7 +53,7 @@ const setupDefaultUser = async () => {
5353
.insert({
5454
user_id: user.id,
5555
type: "password",
56-
secret: password,
56+
secret: initialAdminPassword,
5757
meta: {},
5858
});
5959

backend/templates/_access.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
auth_basic "Authorization required";
55
auth_basic_user_file /data/access/{{ access_list_id }};
66

7-
{% if access_list.pass_auth == 0 or access_list.pass_auth == true %}
7+
{% if access_list.pass_auth == 0 or access_list.pass_auth == false %}
88
proxy_set_header Authorization "";
99
{% endif %}
1010

docker/ci.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
AUTHENTIK_SECRET_KEY=gl8woZe8L6IIX8SC0c5Ocsj0xPkX5uJo5DVZCFl+L/QGbzuplfutYuua2ODNLEiDD3aFd9H2ylJmrke0
22
AUTHENTIK_REDIS__HOST=authentik-redis
3-
AUTHENTIK_POSTGRESQL__HOST=db-postgres
3+
AUTHENTIK_POSTGRESQL__HOST=pgdb.internal
44
AUTHENTIK_POSTGRESQL__USER=authentik
55
AUTHENTIK_POSTGRESQL__NAME=authentik
66
AUTHENTIK_POSTGRESQL__PASSWORD=07EKS5NLI6Tpv68tbdvrxfvj

docker/docker-compose.ci.postgres.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66

77
fullstack:
88
environment:
9-
DB_POSTGRES_HOST: "db-postgres"
9+
DB_POSTGRES_HOST: "pgdb.internal"
1010
DB_POSTGRES_PORT: "5432"
1111
DB_POSTGRES_USER: "npm"
1212
DB_POSTGRES_PASSWORD: "npmpass"
@@ -27,7 +27,9 @@ services:
2727
- psql_vol:/var/lib/postgresql/data
2828
- ./ci/postgres:/docker-entrypoint-initdb.d
2929
networks:
30-
- fulltest
30+
fulltest:
31+
aliases:
32+
- pgdb.internal
3133

3234
authentik-redis:
3335
image: "redis:alpine"
@@ -41,6 +43,8 @@ services:
4143
timeout: 3s
4244
volumes:
4345
- redis_vol:/data
46+
networks:
47+
- fulltest
4448

4549
authentik:
4650
image: ghcr.io/goauthentik/server:2024.10.1
@@ -51,6 +55,8 @@ services:
5155
depends_on:
5256
- authentik-redis
5357
- db-postgres
58+
networks:
59+
- fulltest
5460

5561
authentik-worker:
5662
image: ghcr.io/goauthentik/server:2024.10.1
@@ -61,6 +67,8 @@ services:
6167
depends_on:
6268
- authentik-redis
6369
- db-postgres
70+
networks:
71+
- fulltest
6472

6573
authentik-ldap:
6674
image: ghcr.io/goauthentik/ldap:2024.10.1
@@ -71,6 +79,8 @@ services:
7179
restart: unless-stopped
7280
depends_on:
7381
- authentik
82+
networks:
83+
- fulltest
7484

7585
volumes:
7686
psql_vol:

docker/docker-compose.ci.yml

Lines changed: 39 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,30 @@
33
# This is a base compose file, it should be extended with a
44
# docker-compose.ci.*.yml file
55
services:
6-
76
fullstack:
87
image: "${IMAGE}:${BRANCH_LOWER}-ci-${BUILD_NUMBER}"
98
environment:
109
TZ: "${TZ:-Australia/Brisbane}"
11-
DEBUG: 'true'
12-
CI: 'true'
10+
DEBUG: "true"
11+
CI: "true"
1312
FORCE_COLOR: 1
1413
# Required for DNS Certificate provisioning in CI
15-
LE_SERVER: 'https://ca.internal/acme/acme/directory'
16-
REQUESTS_CA_BUNDLE: '/etc/ssl/certs/NginxProxyManager.crt'
14+
LE_SERVER: "https://ca.internal/acme/acme/directory"
15+
REQUESTS_CA_BUNDLE: "/etc/ssl/certs/NginxProxyManager.crt"
1716
volumes:
18-
- 'npm_data_ci:/data'
19-
- 'npm_le_ci:/etc/letsencrypt'
20-
- './dev/letsencrypt.ini:/etc/letsencrypt.ini:ro'
21-
- './dev/resolv.conf:/etc/resolv.conf:ro'
22-
- '/etc/localtime:/etc/localtime:ro'
17+
- "npm_data_ci:/data"
18+
- "npm_le_ci:/etc/letsencrypt"
19+
- "./dev/letsencrypt.ini:/etc/letsencrypt.ini:ro"
20+
- "./dev/resolv.conf:/etc/resolv.conf:ro"
21+
- "/etc/localtime:/etc/localtime:ro"
2322
healthcheck:
2423
test: ["CMD", "/usr/bin/check-health"]
2524
interval: 10s
2625
timeout: 3s
2726
expose:
28-
- '80-81/tcp'
29-
- '443/tcp'
30-
- '1500-1503/tcp'
27+
- "80-81/tcp"
28+
- "443/tcp"
29+
- "1500-1503/tcp"
3130
networks:
3231
fulltest:
3332
aliases:
@@ -38,8 +37,8 @@ services:
3837
stepca:
3938
image: jc21/testca
4039
volumes:
41-
- './dev/resolv.conf:/etc/resolv.conf:ro'
42-
- '/etc/localtime:/etc/localtime:ro'
40+
- "./dev/resolv.conf:/etc/resolv.conf:ro"
41+
- "/etc/localtime:/etc/localtime:ro"
4342
networks:
4443
fulltest:
4544
aliases:
@@ -48,18 +47,18 @@ services:
4847
pdns:
4948
image: pschiffe/pdns-mysql:4.8
5049
volumes:
51-
- '/etc/localtime:/etc/localtime:ro'
50+
- "/etc/localtime:/etc/localtime:ro"
5251
environment:
53-
PDNS_master: 'yes'
54-
PDNS_api: 'yes'
55-
PDNS_api_key: 'npm'
56-
PDNS_webserver: 'yes'
57-
PDNS_webserver_address: '0.0.0.0'
58-
PDNS_webserver_password: 'npm'
59-
PDNS_webserver-allow-from: '127.0.0.0/8,192.0.0.0/8,10.0.0.0/8,172.0.0.0/8'
60-
PDNS_version_string: 'anonymous'
52+
PDNS_master: "yes"
53+
PDNS_api: "yes"
54+
PDNS_api_key: "npm"
55+
PDNS_webserver: "yes"
56+
PDNS_webserver_address: "0.0.0.0"
57+
PDNS_webserver_password: "npm"
58+
PDNS_webserver-allow-from: "127.0.0.0/8,192.0.0.0/8,10.0.0.0/8,172.0.0.0/8"
59+
PDNS_version_string: "anonymous"
6160
PDNS_default_ttl: 1500
62-
PDNS_allow_axfr_ips: '127.0.0.0/8,192.0.0.0/8,10.0.0.0/8,172.0.0.0/8'
61+
PDNS_allow_axfr_ips: "127.0.0.0/8,192.0.0.0/8,10.0.0.0/8,172.0.0.0/8"
6362
PDNS_gmysql_host: pdns-db
6463
PDNS_gmysql_port: 3306
6564
PDNS_gmysql_user: pdns
@@ -76,14 +75,14 @@ services:
7675
pdns-db:
7776
image: mariadb
7877
environment:
79-
MYSQL_ROOT_PASSWORD: 'pdns'
80-
MYSQL_DATABASE: 'pdns'
81-
MYSQL_USER: 'pdns'
82-
MYSQL_PASSWORD: 'pdns'
78+
MYSQL_ROOT_PASSWORD: "pdns"
79+
MYSQL_DATABASE: "pdns"
80+
MYSQL_USER: "pdns"
81+
MYSQL_PASSWORD: "pdns"
8382
volumes:
84-
- 'pdns_mysql_vol:/var/lib/mysql'
85-
- '/etc/localtime:/etc/localtime:ro'
86-
- './dev/pdns-db.sql:/docker-entrypoint-initdb.d/01_init.sql:ro'
83+
- "pdns_mysql_vol:/var/lib/mysql"
84+
- "/etc/localtime:/etc/localtime:ro"
85+
- "./dev/pdns-db.sql:/docker-entrypoint-initdb.d/01_init.sql:ro"
8786
networks:
8887
- fulltest
8988

@@ -100,22 +99,22 @@ services:
10099
context: ../
101100
dockerfile: test/cypress/Dockerfile
102101
environment:
103-
HTTP_PROXY: 'squid:3128'
104-
HTTPS_PROXY: 'squid:3128'
102+
HTTP_PROXY: "squid:3128"
103+
HTTPS_PROXY: "squid:3128"
105104
volumes:
106-
- 'cypress_logs:/test/results'
107-
- './dev/resolv.conf:/etc/resolv.conf:ro'
108-
- '/etc/localtime:/etc/localtime:ro'
105+
- "cypress_logs:/test/results"
106+
- "./dev/resolv.conf:/etc/resolv.conf:ro"
107+
- "/etc/localtime:/etc/localtime:ro"
109108
command: cypress run --browser chrome --config-file=cypress/config/ci.js
110109
networks:
111110
- fulltest
112111

113112
squid:
114113
image: ubuntu/squid
115114
volumes:
116-
- './dev/squid.conf:/etc/squid/squid.conf:ro'
117-
- './dev/resolv.conf:/etc/resolv.conf:ro'
118-
- '/etc/localtime:/etc/localtime:ro'
115+
- "./dev/squid.conf:/etc/squid/squid.conf:ro"
116+
- "./dev/resolv.conf:/etc/resolv.conf:ro"
117+
- "/etc/localtime:/etc/localtime:ro"
119118
networks:
120119
- fulltest
121120

0 commit comments

Comments
 (0)