Skip to content

Commit 046cb0b

Browse files
committed
Added HTTP/2 Support for SSL enabled hosts
1 parent 9fd480c commit 046cb0b

File tree

17 files changed

+159
-28
lines changed

17 files changed

+159
-28
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Nginx Proxy Manager
44

5-
![Version](https://img.shields.io/badge/version-2.0.5-green.svg?style=for-the-badge)
5+
![Version](https://img.shields.io/badge/version-2.0.6-green.svg?style=for-the-badge)
66
![Stars](https://img.shields.io/docker/stars/jc21/nginx-proxy-manager.svg?style=for-the-badge)
77
![Pulls](https://img.shields.io/docker/pulls/jc21/nginx-proxy-manager.svg?style=for-the-badge)
88

TODO.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

doc/DOCKERHUB.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Nginx Proxy Manager
44

5-
![Version](https://img.shields.io/badge/version-2.0.5-green.svg?style=for-the-badge)
5+
![Version](https://img.shields.io/badge/version-2.0.6-green.svg?style=for-the-badge)
66
![Stars](https://img.shields.io/docker/stars/jc21/nginx-proxy-manager.svg?style=for-the-badge)
77
![Pulls](https://img.shields.io/docker/pulls/jc21/nginx-proxy-manager.svg?style=for-the-badge)
88

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nginx-proxy-manager",
3-
"version": "2.0.5",
3+
"version": "2.0.6",
44
"description": "A beautiful interface for creating Nginx endpoints",
55
"main": "src/backend/index.js",
66
"devDependencies": {
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
'use strict';
2+
3+
const migrate_name = 'http2_support';
4+
const logger = require('../logger').migrate;
5+
6+
/**
7+
* Migrate
8+
*
9+
* @see http://knexjs.org/#Schema
10+
*
11+
* @param {Object} knex
12+
* @param {Promise} Promise
13+
* @returns {Promise}
14+
*/
15+
exports.up = function (knex/*, Promise*/) {
16+
logger.info('[' + migrate_name + '] Migrating Up...');
17+
18+
return knex.schema.table('proxy_host', function (proxy_host) {
19+
proxy_host.integer('http2_support').notNull().unsigned().defaultTo(0);
20+
})
21+
.then(() => {
22+
logger.info('[' + migrate_name + '] proxy_host Table altered');
23+
24+
return knex.schema.table('redirection_host', function (redirection_host) {
25+
redirection_host.integer('http2_support').notNull().unsigned().defaultTo(0);
26+
});
27+
})
28+
.then(() => {
29+
logger.info('[' + migrate_name + '] redirection_host Table altered');
30+
31+
return knex.schema.table('dead_host', function (dead_host) {
32+
dead_host.integer('http2_support').notNull().unsigned().defaultTo(0);
33+
});
34+
})
35+
.then(() => {
36+
logger.info('[' + migrate_name + '] dead_host Table altered');
37+
});
38+
};
39+
40+
/**
41+
* Undo Migrate
42+
*
43+
* @param {Object} knex
44+
* @param {Promise} Promise
45+
* @returns {Promise}
46+
*/
47+
exports.down = function (knex, Promise) {
48+
logger.warn('[' + migrate_name + '] You can\'t migrate down this one.');
49+
return Promise.resolve(true);
50+
};
51+

src/backend/schema/definitions.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,11 @@
186186
"type": "string",
187187
"pattern": "^(letsencrypt|other)$"
188188
},
189+
"http2_support": {
190+
"description": "HTTP2 Protocol Support",
191+
"example": false,
192+
"type": "boolean"
193+
},
189194
"block_exploits": {
190195
"description": "Should we block common exploits",
191196
"example": true,

src/backend/schema/endpoints/dead-hosts.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
"ssl_forced": {
2525
"$ref": "../definitions.json#/definitions/ssl_forced"
2626
},
27+
"http2_support": {
28+
"$ref": "../definitions.json#/definitions/http2_support"
29+
},
2730
"advanced_config": {
2831
"type": "string"
2932
},
@@ -50,6 +53,9 @@
5053
"ssl_forced": {
5154
"$ref": "#/definitions/ssl_forced"
5255
},
56+
"http2_support": {
57+
"$ref": "#/definitions/http2_support"
58+
},
5359
"advanced_config": {
5460
"$ref": "#/definitions/advanced_config"
5561
},
@@ -101,6 +107,9 @@
101107
"ssl_forced": {
102108
"$ref": "#/definitions/ssl_forced"
103109
},
110+
"http2_support": {
111+
"$ref": "#/definitions/http2_support"
112+
},
104113
"advanced_config": {
105114
"$ref": "#/definitions/advanced_config"
106115
},
@@ -138,6 +147,9 @@
138147
"ssl_forced": {
139148
"$ref": "#/definitions/ssl_forced"
140149
},
150+
"http2_support": {
151+
"$ref": "#/definitions/http2_support"
152+
},
141153
"advanced_config": {
142154
"$ref": "#/definitions/advanced_config"
143155
},

src/backend/schema/endpoints/proxy-hosts.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
"ssl_forced": {
3535
"$ref": "../definitions.json#/definitions/ssl_forced"
3636
},
37+
"http2_support": {
38+
"$ref": "../definitions.json#/definitions/http2_support"
39+
},
3740
"block_exploits": {
3841
"$ref": "../definitions.json#/definitions/block_exploits"
3942
},
@@ -80,6 +83,9 @@
8083
"ssl_forced": {
8184
"$ref": "#/definitions/ssl_forced"
8285
},
86+
"http2_support": {
87+
"$ref": "#/definitions/http2_support"
88+
},
8389
"block_exploits": {
8490
"$ref": "#/definitions/block_exploits"
8591
},
@@ -151,6 +157,9 @@
151157
"ssl_forced": {
152158
"$ref": "#/definitions/ssl_forced"
153159
},
160+
"http2_support": {
161+
"$ref": "#/definitions/http2_support"
162+
},
154163
"block_exploits": {
155164
"$ref": "#/definitions/block_exploits"
156165
},
@@ -206,6 +215,9 @@
206215
"ssl_forced": {
207216
"$ref": "#/definitions/ssl_forced"
208217
},
218+
"http2_support": {
219+
"$ref": "#/definitions/http2_support"
220+
},
209221
"block_exploits": {
210222
"$ref": "#/definitions/block_exploits"
211223
},

src/backend/schema/endpoints/redirection-hosts.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
"ssl_forced": {
3333
"$ref": "../definitions.json#/definitions/ssl_forced"
3434
},
35+
"http2_support": {
36+
"$ref": "../definitions.json#/definitions/http2_support"
37+
},
3538
"block_exploits": {
3639
"$ref": "../definitions.json#/definitions/block_exploits"
3740
},
@@ -67,6 +70,9 @@
6770
"ssl_forced": {
6871
"$ref": "#/definitions/ssl_forced"
6972
},
73+
"http2_support": {
74+
"$ref": "#/definitions/http2_spport"
75+
},
7076
"block_exploits": {
7177
"$ref": "#/definitions/block_exploits"
7278
},
@@ -128,6 +134,9 @@
128134
"ssl_forced": {
129135
"$ref": "#/definitions/ssl_forced"
130136
},
137+
"http2_support": {
138+
"$ref": "#/definitions/http2_support"
139+
},
131140
"block_exploits": {
132141
"$ref": "#/definitions/block_exploits"
133142
},
@@ -174,6 +183,9 @@
174183
"ssl_forced": {
175184
"$ref": "#/definitions/ssl_forced"
176185
},
186+
"http2_support": {
187+
"$ref": "#/definitions/http2_support"
188+
},
177189
"block_exploits": {
178190
"$ref": "#/definitions/block_exploits"
179191
},

src/backend/templates/_listen.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
listen 80;
22
{% if certificate -%}
3-
listen 443 ssl;
3+
listen 443 ssl{% if http2 %} http2{% endif %};
44
{% endif %}
5-
server_name {{ domain_names | join: " " }};
5+
server_name {{ domain_names | join: " " }};

0 commit comments

Comments
 (0)