mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-07-06 17:59:37 +00:00
client_max_body_size setting
This commit is contained in:
34
backend/migrations/20241209025008_client_max_body_size.js
Normal file
34
backend/migrations/20241209025008_client_max_body_size.js
Normal file
@ -0,0 +1,34 @@
|
||||
const migrate_name = 'client_max_body_size';
|
||||
const logger = require('../logger').migrate;
|
||||
|
||||
/**
|
||||
* Migrate
|
||||
*
|
||||
* @see http://knexjs.org/#Schema
|
||||
*
|
||||
* @param {Object} knex
|
||||
* @param {Promise} Promise
|
||||
* @returns {Promise}
|
||||
*/
|
||||
exports.up = function (knex/*, Promise*/) {
|
||||
logger.info('[' + migrate_name + '] Migrating Up...');
|
||||
|
||||
return knex.schema.table('proxy_host', function (proxy_host) {
|
||||
proxy_host.integer('client_max_body_size').notNull().unsigned().defaultTo('1');
|
||||
})
|
||||
.then(() => {
|
||||
logger.info('[' + migrate_name + '] proxy_host Table altered');
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Undo Migrate
|
||||
*
|
||||
* @param {Object} knex
|
||||
* @param {Promise} Promise
|
||||
* @returns {Promise}
|
||||
*/
|
||||
exports.down = function (knex, Promise) {
|
||||
logger.warn('[' + migrate_name + '] You can\'t migrate down this one.');
|
||||
return Promise.resolve(true);
|
||||
};
|
@ -9,6 +9,7 @@
|
||||
"domain_names",
|
||||
"forward_host",
|
||||
"forward_port",
|
||||
"client_max_body_size",
|
||||
"access_list_id",
|
||||
"certificate_id",
|
||||
"ssl_forced",
|
||||
@ -52,6 +53,11 @@
|
||||
"minimum": 1,
|
||||
"maximum": 65535
|
||||
},
|
||||
"client_max_body_size": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 4096
|
||||
},
|
||||
"access_list_id": {
|
||||
"$ref": "../common.json#/properties/access_list_id"
|
||||
},
|
||||
@ -112,6 +118,9 @@
|
||||
"forward_port": {
|
||||
"$ref": "#/properties/forward_port"
|
||||
},
|
||||
"client_max_body_size": {
|
||||
"$ref": "#/properties/client_max_body_size"
|
||||
},
|
||||
"forward_path": {
|
||||
"type": "string"
|
||||
},
|
||||
|
@ -34,6 +34,7 @@
|
||||
"domain_names": ["test.example.com"],
|
||||
"forward_host": "127.0.0.1",
|
||||
"forward_port": 8989,
|
||||
"client_max_body_size": 1,
|
||||
"access_list_id": 0,
|
||||
"certificate_id": 0,
|
||||
"ssl_forced": false,
|
||||
|
@ -34,6 +34,7 @@
|
||||
"domain_names": ["test.example.com"],
|
||||
"forward_host": "192.168.0.10",
|
||||
"forward_port": 8989,
|
||||
"client_max_body_size": 1,
|
||||
"access_list_id": 0,
|
||||
"certificate_id": 0,
|
||||
"ssl_forced": false,
|
||||
|
@ -41,6 +41,9 @@
|
||||
"forward_port": {
|
||||
"$ref": "../../../../components/proxy-host-object.json#/properties/forward_port"
|
||||
},
|
||||
"client_max_body_size": {
|
||||
"$ref": "../../../../components/proxy-host-object.json#/properties/client_max_body_size"
|
||||
},
|
||||
"certificate_id": {
|
||||
"$ref": "../../../../components/proxy-host-object.json#/properties/certificate_id"
|
||||
},
|
||||
@ -100,6 +103,7 @@
|
||||
"domain_names": ["test.example.com"],
|
||||
"forward_host": "192.168.0.10",
|
||||
"forward_port": 8989,
|
||||
"client_max_body_size": 1,
|
||||
"access_list_id": 0,
|
||||
"certificate_id": 0,
|
||||
"ssl_forced": false,
|
||||
|
@ -29,6 +29,9 @@
|
||||
"forward_port": {
|
||||
"$ref": "../../../components/proxy-host-object.json#/properties/forward_port"
|
||||
},
|
||||
"client_max_body_size": {
|
||||
"$ref": "../../../components/proxy-host-object.json#/properties/client_max_body_size"
|
||||
},
|
||||
"certificate_id": {
|
||||
"$ref": "../../../components/proxy-host-object.json#/properties/certificate_id"
|
||||
},
|
||||
@ -88,6 +91,7 @@
|
||||
"domain_names": ["test.example.com"],
|
||||
"forward_host": "127.0.0.1",
|
||||
"forward_port": 8989,
|
||||
"client_max_body_size": 1,
|
||||
"access_list_id": 0,
|
||||
"certificate_id": 0,
|
||||
"ssl_forced": false,
|
||||
|
@ -47,6 +47,8 @@ proxy_http_version 1.1;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
client_max_body_size {{ client_max_body_size }}m;
|
||||
|
||||
# Custom
|
||||
include /data/nginx/custom/server_proxy[.]conf;
|
||||
}
|
||||
|
Reference in New Issue
Block a user