diff --git a/tests/core/antibot/docker-compose.yml b/tests/core/antibot/docker-compose.yml index 6c5ab569b..d4ccc856c 100644 --- a/tests/core/antibot/docker-compose.yml +++ b/tests/core/antibot/docker-compose.yml @@ -23,8 +23,9 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') - ngx.exit(ngx.OK) + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) } } networks: diff --git a/tests/core/antibot/ready.conf b/tests/core/antibot/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/antibot/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/antibot/test.sh b/tests/core/antibot/test.sh index 5810c4abc..c0a7e1775 100755 --- a/tests/core/antibot/test.sh +++ b/tests/core/antibot/test.sh @@ -31,6 +31,7 @@ else echo "USE_ANTIBOT=no" | sudo tee -a /etc/bunkerweb/variables.env echo "ANTIBOT_URI=/challenge" | sudo tee -a /etc/bunkerweb/variables.env sudo touch /var/www/html/index.html + sudo cp ready.conf /etc/bunkerweb/server-http fi manual=0 diff --git a/tests/core/authbasic/docker-compose.yml b/tests/core/authbasic/docker-compose.yml index 415f01dfb..8663d205e 100644 --- a/tests/core/authbasic/docker-compose.yml +++ b/tests/core/authbasic/docker-compose.yml @@ -25,7 +25,8 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') + ngx.print('ready') + ngx.flush(true) ngx.exit(ngx.HTTP_OK) } } diff --git a/tests/core/authbasic/ready.conf b/tests/core/authbasic/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/authbasic/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/authbasic/test.sh b/tests/core/authbasic/test.sh index 01104a3cc..6c052bce4 100755 --- a/tests/core/authbasic/test.sh +++ b/tests/core/authbasic/test.sh @@ -33,6 +33,7 @@ else echo "AUTH_BASIC_USER=bunkerity" | sudo tee -a /etc/bunkerweb/variables.env echo "AUTH_BASIC_PASSWORD=Secr3tP@ssw0rd" | sudo tee -a /etc/bunkerweb/variables.env sudo wget -O /var/www/html/index.html https://github.com/nginxinc/NGINX-Demos/raw/master/nginx-hello-nonroot/html-version/index.html + sudo cp ready.conf /etc/bunkerweb/server-http fi manual=0 diff --git a/tests/core/badbehavior/docker-compose.yml b/tests/core/badbehavior/docker-compose.yml index d94926165..277f38141 100644 --- a/tests/core/badbehavior/docker-compose.yml +++ b/tests/core/badbehavior/docker-compose.yml @@ -25,7 +25,8 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') + ngx.print('ready') + ngx.flush(true) ngx.exit(ngx.HTTP_OK) } } diff --git a/tests/core/badbehavior/ready.conf b/tests/core/badbehavior/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/badbehavior/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/badbehavior/test.sh b/tests/core/badbehavior/test.sh index c0f133283..88660d6e6 100755 --- a/tests/core/badbehavior/test.sh +++ b/tests/core/badbehavior/test.sh @@ -36,6 +36,7 @@ else echo "BAD_BEHAVIOR_COUNT_TIME=60" | sudo tee -a /etc/bunkerweb/variables.env sudo touch /var/www/html/index.html export TEST_TYPE="linux" + sudo cp ready.conf /etc/bunkerweb/server-http fi manual=0 diff --git a/tests/core/blacklist/docker-compose.yml b/tests/core/blacklist/docker-compose.yml index de5193d49..f7c928c82 100644 --- a/tests/core/blacklist/docker-compose.yml +++ b/tests/core/blacklist/docker-compose.yml @@ -41,7 +41,8 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') + ngx.print('ready') + ngx.flush(true) ngx.exit(ngx.HTTP_OK) } } diff --git a/tests/core/blacklist/ready.conf b/tests/core/blacklist/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/blacklist/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/blacklist/test.sh b/tests/core/blacklist/test.sh index 5a80f569c..dba0cc376 100755 --- a/tests/core/blacklist/test.sh +++ b/tests/core/blacklist/test.sh @@ -65,6 +65,7 @@ else echo "BLACKLIST_IGNORE_URI_URLS=" | sudo tee -a /etc/bunkerweb/variables.env sudo touch /var/www/html/index.html export TEST_TYPE="linux" + sudo cp ready.conf /etc/bunkerweb/server-http fi manual=0 diff --git a/tests/core/brotli/docker-compose.yml b/tests/core/brotli/docker-compose.yml index d947d2219..2a097f0f3 100644 --- a/tests/core/brotli/docker-compose.yml +++ b/tests/core/brotli/docker-compose.yml @@ -22,7 +22,8 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') + ngx.print('ready') + ngx.flush(true) ngx.exit(ngx.HTTP_OK) } } diff --git a/tests/core/brotli/ready.conf b/tests/core/brotli/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/brotli/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/brotli/test.sh b/tests/core/brotli/test.sh index ab39b2a66..c802de69c 100755 --- a/tests/core/brotli/test.sh +++ b/tests/core/brotli/test.sh @@ -30,6 +30,7 @@ else sudo systemctl stop bunkerweb echo "USE_BROTLI=no" | sudo tee -a /etc/bunkerweb/variables.env sudo touch /var/www/html/index.html + sudo cp ready.conf /etc/bunkerweb/server-http fi manual=0 diff --git a/tests/core/bunkernet/docker-compose.yml b/tests/core/bunkernet/docker-compose.yml index ea6864bd9..c48624743 100644 --- a/tests/core/bunkernet/docker-compose.yml +++ b/tests/core/bunkernet/docker-compose.yml @@ -21,7 +21,8 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') + ngx.print('ready') + ngx.flush(true) ngx.exit(ngx.HTTP_OK) } } diff --git a/tests/core/bunkernet/ready.conf b/tests/core/bunkernet/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/bunkernet/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/bunkernet/test.sh b/tests/core/bunkernet/test.sh index d5677dc72..0bcc3800f 100755 --- a/tests/core/bunkernet/test.sh +++ b/tests/core/bunkernet/test.sh @@ -46,6 +46,7 @@ else export BUNKERNET_SERVER="http://127.0.0.1:8080" sudo touch /var/www/html/index.html python3 api/main.py & + sudo cp ready.conf /etc/bunkerweb/server-http fi manual=0 diff --git a/tests/core/bwcli/docker-compose.yml b/tests/core/bwcli/docker-compose.yml index fbece59df..96ca5e392 100644 --- a/tests/core/bwcli/docker-compose.yml +++ b/tests/core/bwcli/docker-compose.yml @@ -19,7 +19,8 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') + ngx.print('ready') + ngx.flush(true) ngx.exit(ngx.HTTP_OK) } } diff --git a/tests/core/bwcli/ready.conf b/tests/core/bwcli/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/bwcli/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/bwcli/test.sh b/tests/core/bwcli/test.sh index e05d2fb73..667b43828 100755 --- a/tests/core/bwcli/test.sh +++ b/tests/core/bwcli/test.sh @@ -45,6 +45,7 @@ else export USE_REDIS="yes" export REDIS_HOST="127.0.0.1" sudo touch /var/www/html/index.html + sudo cp ready.conf /etc/bunkerweb/server-http fi cleanup_stack () { diff --git a/tests/core/clientcache/docker-compose.yml b/tests/core/clientcache/docker-compose.yml index 88d2791fd..49e6b62e8 100644 --- a/tests/core/clientcache/docker-compose.yml +++ b/tests/core/clientcache/docker-compose.yml @@ -24,7 +24,8 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') + ngx.print('ready') + ngx.flush(true) ngx.exit(ngx.HTTP_OK) } } diff --git a/tests/core/clientcache/ready.conf b/tests/core/clientcache/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/clientcache/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/clientcache/test.sh b/tests/core/clientcache/test.sh index 180fa114b..4d47f9d4a 100755 --- a/tests/core/clientcache/test.sh +++ b/tests/core/clientcache/test.sh @@ -34,6 +34,7 @@ else echo "CLIENT_CACHE_CONTROL=public, max-age=15552000" | sudo tee -a /etc/bunkerweb/variables.env sudo touch /var/www/html/index.html sudo cp image.png /var/www/html/image.png + sudo cp ready.conf /etc/bunkerweb/server-http fi manual=0 diff --git a/tests/core/cors/docker-compose.yml b/tests/core/cors/docker-compose.yml index fd0c35537..1ebbbea9e 100644 --- a/tests/core/cors/docker-compose.yml +++ b/tests/core/cors/docker-compose.yml @@ -34,7 +34,8 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') + ngx.print('ready') + ngx.flush(true) ngx.exit(ngx.HTTP_OK) } } diff --git a/tests/core/cors/ready.conf b/tests/core/cors/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/cors/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/cors/test.sh b/tests/core/cors/test.sh index 4d7daef7c..7d1d74696 100755 --- a/tests/core/cors/test.sh +++ b/tests/core/cors/test.sh @@ -43,6 +43,7 @@ else echo "CORS_ALLOW_CREDENTIALS=no" | sudo tee -a /etc/bunkerweb/variables.env echo "CORS_ALLOW_METHODS=GET, POST, OPTIONS" | sudo tee -a /etc/bunkerweb/variables.env echo "CORS_ALLOW_HEADERS=DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range" | sudo tee -a /etc/bunkerweb/variables.env + sudo cp ready.conf /etc/bunkerweb/server-http fi manual=0 diff --git a/tests/core/country/docker-compose.yml b/tests/core/country/docker-compose.yml index c376eee00..535874847 100644 --- a/tests/core/country/docker-compose.yml +++ b/tests/core/country/docker-compose.yml @@ -22,7 +22,8 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') + ngx.print('ready') + ngx.flush(true) ngx.exit(ngx.HTTP_OK) } } diff --git a/tests/core/country/ready.conf b/tests/core/country/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/country/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/country/test.sh b/tests/core/country/test.sh index 965621897..f3b5076ba 100755 --- a/tests/core/country/test.sh +++ b/tests/core/country/test.sh @@ -36,6 +36,7 @@ else sudo touch /var/www/html/index.html export COUNTRY="" export TEST_TYPE="linux" + sudo cp ready.conf /etc/bunkerweb/server-http fi manual=0 diff --git a/tests/core/customcert/docker-compose.yml b/tests/core/customcert/docker-compose.yml index d389fbcb3..0438fc826 100644 --- a/tests/core/customcert/docker-compose.yml +++ b/tests/core/customcert/docker-compose.yml @@ -24,7 +24,8 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') + ngx.print('ready') + ngx.flush(true) ngx.exit(ngx.HTTP_OK) } } diff --git a/tests/core/customcert/ready.conf b/tests/core/customcert/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/customcert/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/customcert/test.sh b/tests/core/customcert/test.sh index a392613f0..d65c74a43 100755 --- a/tests/core/customcert/test.sh +++ b/tests/core/customcert/test.sh @@ -32,6 +32,7 @@ else echo "CUSTOM_SSL_CERT=/tmp/certificate.pem" | sudo tee -a /etc/bunkerweb/variables.env echo "CUSTOM_SSL_KEY=/tmp/privatekey.key" | sudo tee -a /etc/bunkerweb/variables.env sudo touch /var/www/html/index.html + sudo cp ready.conf /etc/bunkerweb/server-http fi manual=0 diff --git a/tests/core/db/docker-compose.yml b/tests/core/db/docker-compose.yml index 312d59fc1..76b141616 100644 --- a/tests/core/db/docker-compose.yml +++ b/tests/core/db/docker-compose.yml @@ -22,7 +22,8 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') + ngx.print('ready') + ngx.flush(true) ngx.exit(ngx.HTTP_OK) } } diff --git a/tests/core/db/ready.conf b/tests/core/db/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/db/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/db/test.sh b/tests/core/db/test.sh index 9fcb5ebc4..347fd019b 100755 --- a/tests/core/db/test.sh +++ b/tests/core/db/test.sh @@ -64,6 +64,7 @@ else export GLOBAL_REVERSE_PROXY_HOST="http://app1:8080" export GLOBAL_REVERSE_PROXY_URL="/" export CUSTOM_CONF_MODSEC_test_custom_conf='SecRule REQUEST_FILENAME "@rx ^/db" "id:10000,ctl:ruleRemoveByTag=attack-generic,ctl:ruleRemoveByTag=attack-protocol,nolog"' + sudo cp ready.conf /etc/bunkerweb/server-http fi manual=0 diff --git a/tests/core/dnsbl/docker-compose.yml b/tests/core/dnsbl/docker-compose.yml index 5f24b7858..c4d9b38dd 100644 --- a/tests/core/dnsbl/docker-compose.yml +++ b/tests/core/dnsbl/docker-compose.yml @@ -22,7 +22,8 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') + ngx.print('ready') + ngx.flush(true) ngx.exit(ngx.HTTP_OK) } } diff --git a/tests/core/dnsbl/ready.conf b/tests/core/dnsbl/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/dnsbl/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/dnsbl/test.sh b/tests/core/dnsbl/test.sh index 4792b3184..641d18e36 100755 --- a/tests/core/dnsbl/test.sh +++ b/tests/core/dnsbl/test.sh @@ -36,6 +36,7 @@ else echo "DNSBL_LIST=" | sudo tee -a /etc/bunkerweb/variables.env sudo touch /var/www/html/index.html export TEST_TYPE="linux" + sudo cp ready.conf /etc/bunkerweb/server-http fi manual=0 diff --git a/tests/core/errors/docker-compose.yml b/tests/core/errors/docker-compose.yml index 5e4fb28c1..48070e927 100644 --- a/tests/core/errors/docker-compose.yml +++ b/tests/core/errors/docker-compose.yml @@ -23,7 +23,8 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') + ngx.print('ready') + ngx.flush(true) ngx.exit(ngx.HTTP_OK) } } diff --git a/tests/core/errors/ready.conf b/tests/core/errors/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/errors/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/errors/test.sh b/tests/core/errors/test.sh index 6e4bda88f..44d63313e 100755 --- a/tests/core/errors/test.sh +++ b/tests/core/errors/test.sh @@ -33,6 +33,7 @@ else sudo touch /var/www/html/index.html sudo mkdir -p /var/www/html/errors sudo cp "403.html" "/var/www/html/errors/403.html" + sudo cp ready.conf /etc/bunkerweb/server-http fi manual=0 diff --git a/tests/core/greylist/docker-compose.yml b/tests/core/greylist/docker-compose.yml index 480fb2b87..1cd2d4306 100644 --- a/tests/core/greylist/docker-compose.yml +++ b/tests/core/greylist/docker-compose.yml @@ -31,7 +31,8 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') + ngx.print('ready') + ngx.flush(true) ngx.exit(ngx.HTTP_OK) } } diff --git a/tests/core/greylist/ready.conf b/tests/core/greylist/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/greylist/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/greylist/test.sh b/tests/core/greylist/test.sh index 3119b1b63..53d69a2f6 100755 --- a/tests/core/greylist/test.sh +++ b/tests/core/greylist/test.sh @@ -55,6 +55,7 @@ else echo "GREYLIST_URI_URLS=" | sudo tee -a /etc/bunkerweb/variables.env sudo touch /var/www/html/index.html export TEST_TYPE="linux" + sudo cp ready.conf /etc/bunkerweb/server-http fi manual=0 diff --git a/tests/core/gzip/docker-compose.yml b/tests/core/gzip/docker-compose.yml index 5110186f3..1287d13c5 100644 --- a/tests/core/gzip/docker-compose.yml +++ b/tests/core/gzip/docker-compose.yml @@ -4,6 +4,8 @@ services: bw: image: bunkerity/bunkerweb:1.5.3 pull_policy: never + ports: + - 80:8080 labels: - "bunkerweb.INSTANCE=yes" environment: @@ -22,7 +24,8 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') + ngx.print('ready') + ngx.flush(true) ngx.exit(ngx.HTTP_OK) } } diff --git a/tests/core/gzip/ready.conf b/tests/core/gzip/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/gzip/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/gzip/test.sh b/tests/core/gzip/test.sh index e5cf9008b..f98d6b9a4 100755 --- a/tests/core/gzip/test.sh +++ b/tests/core/gzip/test.sh @@ -30,6 +30,7 @@ else sudo systemctl stop bunkerweb echo "USE_GZIP=no" | sudo tee -a /etc/bunkerweb/variables.env sudo touch /var/www/html/index.html + sudo cp ready.conf /etc/bunkerweb/server-http fi manual=0 diff --git a/tests/core/headers/docker-compose.yml b/tests/core/headers/docker-compose.yml index 132fc148e..c81ff90ef 100644 --- a/tests/core/headers/docker-compose.yml +++ b/tests/core/headers/docker-compose.yml @@ -36,7 +36,8 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') + ngx.print('ready') + ngx.flush(true) ngx.exit(ngx.HTTP_OK) } } diff --git a/tests/core/headers/ready.conf b/tests/core/headers/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/headers/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/headers/test.sh b/tests/core/headers/test.sh index 698ee4769..cebd66806 100755 --- a/tests/core/headers/test.sh +++ b/tests/core/headers/test.sh @@ -48,6 +48,7 @@ else echo "X_FRAME_OPTIONS=SAMEORIGIN" | sudo tee -a /etc/bunkerweb/variables.env echo "X_CONTENT_TYPE_OPTIONS=nosniff" | sudo tee -a /etc/bunkerweb/variables.env echo "X_XSS_PROTECTION=1; mode=block" | sudo tee -a /etc/bunkerweb/variables.env + sudo cp ready.conf /etc/bunkerweb/server-http fi manual=0 diff --git a/tests/core/inject/docker-compose.yml b/tests/core/inject/docker-compose.yml index b0a15d92f..e45fb9661 100644 --- a/tests/core/inject/docker-compose.yml +++ b/tests/core/inject/docker-compose.yml @@ -21,7 +21,8 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') + ngx.print('ready') + ngx.flush(true) ngx.exit(ngx.HTTP_OK) } } diff --git a/tests/core/inject/ready.conf b/tests/core/inject/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/inject/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/inject/test.sh b/tests/core/inject/test.sh index 381826ff9..fd6aa076d 100755 --- a/tests/core/inject/test.sh +++ b/tests/core/inject/test.sh @@ -30,6 +30,7 @@ else sudo systemctl stop bunkerweb echo "INJECT_BODY=TEST" | sudo tee -a /etc/bunkerweb/variables.env sudo cp index.html /var/www/html/index.html + sudo cp ready.conf /etc/bunkerweb/server-http fi cleanup_stack () { diff --git a/tests/core/limit/docker-compose.yml b/tests/core/limit/docker-compose.yml index 26565a127..3f3e7c09e 100644 --- a/tests/core/limit/docker-compose.yml +++ b/tests/core/limit/docker-compose.yml @@ -26,7 +26,8 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') + ngx.print('ready') + ngx.flush(true) ngx.exit(ngx.HTTP_OK) } } diff --git a/tests/core/limit/ready.conf b/tests/core/limit/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/limit/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/limit/test.sh b/tests/core/limit/test.sh index 12f33cabf..35219c299 100755 --- a/tests/core/limit/test.sh +++ b/tests/core/limit/test.sh @@ -35,6 +35,7 @@ else echo "USE_LIMIT_CONN=yes" | sudo tee -a /etc/bunkerweb/variables.env echo "LIMIT_CONN_MAX_HTTP1=1" | sudo tee -a /etc/bunkerweb/variables.env sudo touch /var/www/html/index.html + sudo cp ready.conf /etc/bunkerweb/server-http fi manual=0 diff --git a/tests/core/misc/docker-compose.yml b/tests/core/misc/docker-compose.yml index e447b4200..8522af235 100644 --- a/tests/core/misc/docker-compose.yml +++ b/tests/core/misc/docker-compose.yml @@ -33,7 +33,8 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') + ngx.print('ready') + ngx.flush(true) ngx.exit(ngx.HTTP_OK) } } diff --git a/tests/core/misc/ready.conf b/tests/core/misc/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/misc/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/misc/test.sh b/tests/core/misc/test.sh index d10a6d0f8..912b8de8b 100755 --- a/tests/core/misc/test.sh +++ b/tests/core/misc/test.sh @@ -43,6 +43,7 @@ else echo "DENY_HTTP_STATUS=403" | sudo tee -a /etc/bunkerweb/variables.env sudo touch /var/www/html/index.html export TEST_TYPE="linux" + sudo cp ready.conf /etc/bunkerweb/server-http fi manual=0 diff --git a/tests/core/modsecurity/docker-compose.yml b/tests/core/modsecurity/docker-compose.yml index f945f789e..32f38a069 100644 --- a/tests/core/modsecurity/docker-compose.yml +++ b/tests/core/modsecurity/docker-compose.yml @@ -25,7 +25,8 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') + ngx.print('ready') + ngx.flush(true) ngx.exit(ngx.HTTP_OK) } } diff --git a/tests/core/modsecurity/ready.conf b/tests/core/modsecurity/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/modsecurity/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/modsecurity/test.sh b/tests/core/modsecurity/test.sh index 86f26a6b6..a3175fee7 100755 --- a/tests/core/modsecurity/test.sh +++ b/tests/core/modsecurity/test.sh @@ -34,6 +34,7 @@ else echo "MODSECURITY_SEC_RULE_ENGINE=On" | sudo tee -a /etc/bunkerweb/variables.env echo "MODSECURITY_SEC_AUDIT_LOG_PARTS=ABCFHZ" | sudo tee -a /etc/bunkerweb/variables.env sudo touch /var/www/html/index.html + sudo cp ready.conf /etc/bunkerweb/server-http fi manual=0 diff --git a/tests/core/redirect/docker-compose.yml b/tests/core/redirect/docker-compose.yml index a16f660df..53a433c40 100644 --- a/tests/core/redirect/docker-compose.yml +++ b/tests/core/redirect/docker-compose.yml @@ -22,7 +22,8 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') + ngx.print('ready') + ngx.flush(true) ngx.exit(ngx.HTTP_OK) } } diff --git a/tests/core/redirect/ready.conf b/tests/core/redirect/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/redirect/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/redirect/test.sh b/tests/core/redirect/test.sh index 14770f07d..de7f3360f 100755 --- a/tests/core/redirect/test.sh +++ b/tests/core/redirect/test.sh @@ -31,6 +31,7 @@ else echo "REDIRECT_TO=" | sudo tee -a /etc/bunkerweb/variables.env echo "REDIRECT_TO_REQUEST_URI=no" | sudo tee -a /etc/bunkerweb/variables.env sudo touch /var/www/html/index.html + sudo cp ready.conf /etc/bunkerweb/server-http fi manual=0 diff --git a/tests/core/redis/docker-compose.yml b/tests/core/redis/docker-compose.yml index 30a3c0114..349873ce2 100644 --- a/tests/core/redis/docker-compose.yml +++ b/tests/core/redis/docker-compose.yml @@ -33,7 +33,8 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') + ngx.print('ready') + ngx.flush(true) ngx.exit(ngx.HTTP_OK) } } diff --git a/tests/core/redis/ready.conf b/tests/core/redis/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/redis/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/redis/test.sh b/tests/core/redis/test.sh index 12d2abd7c..4208c3c6a 100755 --- a/tests/core/redis/test.sh +++ b/tests/core/redis/test.sh @@ -83,6 +83,7 @@ else echo "REDIS_SSL=no" | sudo tee -a /etc/bunkerweb/variables.env sudo touch /var/www/html/index.html export TEST_TYPE="linux" + sudo cp ready.conf /etc/bunkerweb/server-http fi manual=0 diff --git a/tests/core/reversescan/docker-compose.yml b/tests/core/reversescan/docker-compose.yml index 13db942ee..53cb8ae20 100644 --- a/tests/core/reversescan/docker-compose.yml +++ b/tests/core/reversescan/docker-compose.yml @@ -23,7 +23,8 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') + ngx.print('ready') + ngx.flush(true) ngx.exit(ngx.HTTP_OK) } } diff --git a/tests/core/reversescan/ready.conf b/tests/core/reversescan/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/reversescan/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/reversescan/test.sh b/tests/core/reversescan/test.sh index d06ec1769..9f43bd0e1 100755 --- a/tests/core/reversescan/test.sh +++ b/tests/core/reversescan/test.sh @@ -33,6 +33,7 @@ else echo "REVERSE_SCAN_TIMEOUT=500" | sudo tee -a /etc/bunkerweb/variables.env sudo touch /var/www/html/index.html export TEST_TYPE="linux" + sudo cp ready.conf /etc/bunkerweb/server-http fi manual=0 diff --git a/tests/core/selfsigned/docker-compose.yml b/tests/core/selfsigned/docker-compose.yml index 3d97e8966..ec5846ec2 100644 --- a/tests/core/selfsigned/docker-compose.yml +++ b/tests/core/selfsigned/docker-compose.yml @@ -24,7 +24,8 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') + ngx.print('ready') + ngx.flush(true) ngx.exit(ngx.HTTP_OK) } } diff --git a/tests/core/selfsigned/ready.conf b/tests/core/selfsigned/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/selfsigned/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/selfsigned/test.sh b/tests/core/selfsigned/test.sh index 3d341d662..e4dd95e88 100755 --- a/tests/core/selfsigned/test.sh +++ b/tests/core/selfsigned/test.sh @@ -32,6 +32,7 @@ else echo "SELF_SIGNED_SSL_EXPIRY=365" | sudo tee -a /etc/bunkerweb/variables.env echo "SELF_SIGNED_SSL_SUBJ=/CN=www.example.com/" | sudo tee -a /etc/bunkerweb/variables.env sudo touch /var/www/html/index.html + sudo cp ready.conf /etc/bunkerweb/server-http fi manual=0 diff --git a/tests/core/sessions/docker-compose.yml b/tests/core/sessions/docker-compose.yml index 683471d6b..45c728b47 100644 --- a/tests/core/sessions/docker-compose.yml +++ b/tests/core/sessions/docker-compose.yml @@ -23,7 +23,8 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') + ngx.print('ready') + ngx.flush(true) ngx.exit(ngx.HTTP_OK) } } diff --git a/tests/core/sessions/ready.conf b/tests/core/sessions/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/sessions/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/sessions/test.sh b/tests/core/sessions/test.sh index 453716167..7b2bc3350 100755 --- a/tests/core/sessions/test.sh +++ b/tests/core/sessions/test.sh @@ -33,6 +33,7 @@ else echo "SESSIONS_NAME=random" | sudo tee -a /etc/bunkerweb/variables.env sudo touch /var/www/html/index.html export TEST_TYPE="linux" + sudo cp ready.conf /etc/bunkerweb/server-http fi manual=0 diff --git a/tests/core/whitelist/docker-compose.yml b/tests/core/whitelist/docker-compose.yml index b551ad39c..ffad549c5 100644 --- a/tests/core/whitelist/docker-compose.yml +++ b/tests/core/whitelist/docker-compose.yml @@ -34,7 +34,8 @@ services: location /ready { default_type 'text/plain'; rewrite_by_lua_block { - ngx.say('ready') + ngx.print('ready') + ngx.flush(true) ngx.exit(ngx.HTTP_OK) } } diff --git a/tests/core/whitelist/ready.conf b/tests/core/whitelist/ready.conf new file mode 100644 index 000000000..c2f800ac6 --- /dev/null +++ b/tests/core/whitelist/ready.conf @@ -0,0 +1,8 @@ +location /ready { + default_type 'text/plain'; + rewrite_by_lua_block { + ngx.print('ready') + ngx.flush(true) + ngx.exit(ngx.HTTP_OK) + } +} \ No newline at end of file diff --git a/tests/core/whitelist/test.sh b/tests/core/whitelist/test.sh index 9997eead2..266127480 100755 --- a/tests/core/whitelist/test.sh +++ b/tests/core/whitelist/test.sh @@ -58,6 +58,7 @@ else echo "WHITELIST_URI_URLS=" | sudo tee -a /etc/bunkerweb/variables.env sudo touch /var/www/html/index.html export TEST_TYPE="linux" + sudo cp ready.conf /etc/bunkerweb/server-http fi manual=0