File tree Expand file tree Collapse file tree 5 files changed +15
-0
lines changed Expand file tree Collapse file tree 5 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ export PHP_MAX_EXECUTION_TIME=${PHP_MAX_EXECUTION_TIME:-300}
50
50
export PHP_UPLOAD_MAX_FILESIZE=${PHP_UPLOAD_MAX_FILESIZE:- 50M}
51
51
export PHP_POST_MAX_SIZE=${PHP_POST_MAX_SIZE:- 50M}
52
52
export PHP_MAX_INPUT_TIME=${PHP_MAX_INPUT_TIME:- 300}
53
+ export PHP_MAX_FILE_UPLOADS=${PHP_MAX_FILE_UPLOADS:- 50}
53
54
54
55
export PHP_FCGI_CHILDREN=${PHP_FCGI_CHILDREN:- 5}
55
56
export PHP_FCGI_START_SERVERS=${PHP_FCGI_START_SERVERS:- 2}
@@ -67,6 +68,7 @@ export PHP_SESSION_COOKIE_SAMESITE=${PHP_SESSION_COOKIE_SAMESITE:-Lax}
67
68
68
69
export NGINX_X_FORWARDED_FOR=${NGINX_X_FORWARDED_FOR:- false}
69
70
export NGINX_SET_REAL_IP_FROM=${NGINX_SET_REAL_IP_FROM}
71
+ export NGINX_CLIENT_MAX_BODY_SIZE=${NGINX_CLIENT_MAX_BODY_SIZE:- 50M}
70
72
71
73
# start supervisord using the main configuration file so we have a socket interface
72
74
/usr/bin/supervisord -c /etc/supervisor/supervisord.conf
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ change_php_vars() {
19
19
sed -i " s/max_execution_time = .*/max_execution_time = ${PHP_MAX_EXECUTION_TIME} /" " $FILE "
20
20
echo " Configure PHP | Setting 'upload_max_filesize = ${PHP_UPLOAD_MAX_FILESIZE} '"
21
21
sed -i " s/upload_max_filesize = .*/upload_max_filesize = ${PHP_UPLOAD_MAX_FILESIZE} /" " $FILE "
22
+ echo " Configure PHP | Setting 'max_file_uploads = ${PHP_MAX_FILE_UPLOADS} '"
23
+ sed -i " s/max_file_uploads = .*/max_file_uploads = ${PHP_MAX_FILE_UPLOADS} /" " $FILE "
22
24
echo " Configure PHP | Setting 'post_max_size = ${PHP_POST_MAX_SIZE} '"
23
25
sed -i " s/post_max_size = .*/post_max_size = ${PHP_POST_MAX_SIZE} /" " $FILE "
24
26
echo " Configure PHP | Setting 'max_input_time = ${PHP_MAX_INPUT_TIME} '"
Original file line number Diff line number Diff line change @@ -225,6 +225,10 @@ init_nginx() {
225
225
echo " ... adjusting 'fastcgi_connect_timeout' to ${FASTCGI_CONNECT_TIMEOUT} "
226
226
sed -i " s/fastcgi_connect_timeout .*;/fastcgi_connect_timeout ${FASTCGI_CONNECT_TIMEOUT} ;/" /etc/nginx/includes/misp
227
227
228
+ # Adjust maximum allowed size of the client request body
229
+ echo " ... adjusting 'client_max_body_size' to ${NGINX_CLIENT_MAX_BODY_SIZE} "
230
+ sed -i " s/client_max_body_size .*;/client_max_body_size ${NGINX_CLIENT_MAX_BODY_SIZE} ;/" /etc/nginx/includes/misp
231
+
228
232
# Adjust forwarding header settings (clean up first)
229
233
sed -i ' /real_ip_header/d' /etc/nginx/includes/misp
230
234
sed -i ' /real_ip_recursive/d' /etc/nginx/includes/misp
Original file line number Diff line number Diff line change @@ -157,6 +157,7 @@ services:
157
157
# Nginx settings
158
158
- " NGINX_X_FORWARDED_FOR=${NGINX_X_FORWARDED_FOR}"
159
159
- " NGINX_SET_REAL_IP_FROM=${NGINX_SET_REAL_IP_FROM}"
160
+ - " NGINX_CLIENT_MAX_BODY_SIZE=${NGINX_CLIENT_MAX_BODY_SIZE:-50M}"
160
161
# Proxy settings
161
162
- " PROXY_ENABLE=${PROXY_ENABLE}"
162
163
- " PROXY_HOST=${PROXY_HOST}"
@@ -201,6 +202,7 @@ services:
201
202
- " PHP_UPLOAD_MAX_FILESIZE=${PHP_UPLOAD_MAX_FILESIZE:-50M}"
202
203
- " PHP_POST_MAX_SIZE=${PHP_POST_MAX_SIZE:-50M}"
203
204
- " PHP_MAX_INPUT_TIME:${PHP_MAX_INPUT_TIME:-300}"
205
+ - " PHP_MAX_FILE_UPLOADS=${PHP_MAX_FILE_UPLOADS:-50}"
204
206
# PHP FPM pool setup
205
207
- " PHP_FCGI_CHILDREN=${PHP_FCGI_CHILDREN:-5}"
206
208
- " PHP_FCGI_START_SERVERS=${PHP_FCGI_START_SERVERS:-2}"
Original file line number Diff line number Diff line change @@ -200,6 +200,8 @@ SYNCSERVERS_1_PULL_RULES=
200
200
# PHP_POST_MAX_SIZE=50M
201
201
# Maximum time PHP spends parsing input data in seconds.
202
202
# PHP_MAX_INPUT_TIME=300
203
+ # Maximum number of file to upload per request.
204
+ # PHP_MAX_FILE_UPLOADS=50
203
205
204
206
# # PHP FPM pool setup
205
207
# Maximum number of php-fpm processes, limits the number of simultaneous requests.
@@ -252,6 +254,9 @@ SYNCSERVERS_1_PULL_RULES=
252
254
# Options: DENY, SAMEORIGIN, ALLOW-FROM <URL> Default: SAMEORIGIN
253
255
# X_FRAME_OPTIONS=
254
256
257
+ # NGINX maximum allowed size of the client request body.
258
+ # NGINX_CLIENT_MAX_BODY_SIZE=50M
259
+
255
260
# Content-Security-Policy (CSP) configuration: defines allowed resources and prevents attacks like XSS.
256
261
# Example: "frame-src 'self' https://*.example.com; frame-ancestors 'self' https://*.example.com; object-src 'none'; report-uri https://example.com/cspReport"
257
262
# CONTENT_SECURITY_POLICY=
You can’t perform that action at this time.
0 commit comments