Skip to content

Commit

Permalink
Merge branch 'master' into improve/patch_with_cas
Browse files Browse the repository at this point in the history
  • Loading branch information
tokers authored Sep 16, 2020
2 parents 08b6464 + b6354ec commit 876b222
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .travis/apisix_cli_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,21 @@ fi

echo "passed: worker_shutdown_timeout in nginx.conf is ok"

# check the 'client_max_body_size' in 'nginx.conf' .

sed -i 's/client_max_body_size: 0/client_max_body_size: 512m/' conf/config-default.yaml

make init

if ! grep -E "client_max_body_size 512m" conf/nginx.conf > /dev/null; then
echo "failed: client_max_body_size in nginx.conf doesn't change"
exit 1
fi

echo "passed: client_max_body_size in nginx.conf is ok"

git checkout conf/config-default.yaml

# check worker processes number is configurable.

git checkout conf/config.yaml
Expand Down
2 changes: 1 addition & 1 deletion bin/apisix
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ http {
access_log {* http.access_log *} main buffer=16384 flush=3;
open_file_cache max=1000 inactive=60;
client_max_body_size 0;
client_max_body_size {* http.client_max_body_size *};
keepalive_timeout {* http.keepalive_timeout *};
client_header_timeout {* http.client_header_timeout *};
client_body_timeout {* http.client_body_timeout *};
Expand Down
4 changes: 4 additions & 0 deletions conf/config-default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ nginx_config: # config for render the template to genarate n
keepalive_timeout: 60s # timeout during which a keep-alive client connection will stay open on the server side.
client_header_timeout: 60s # timeout for reading client request header, then 408 (Request Time-out) error is returned to the client
client_body_timeout: 60s # timeout for reading client request body, then 408 (Request Time-out) error is returned to the client
client_max_body_size: 0 # The maximum allowed size of the client request body.
# If exceeded, the 413 (Request Entity Too Large) error is returned to the client.
# Note that unlike Nginx, we don't limit the body size by default.

send_timeout: 10s # timeout for transmitting a response to the client.then the connection is closed
underscores_in_headers: "on" # default enables the use of underscores in client request header fields
real_ip_header: "X-Real-IP" # http://nginx.org/en/docs/http/ngx_http_realip_module.html#real_ip_header
Expand Down

0 comments on commit 876b222

Please sign in to comment.