From 5ccbab74b124f3c2ac623566432db15f7a07f260 Mon Sep 17 00:00:00 2001 From: Rasel Islam Rafi <31556372+rtraselbd@users.noreply.github.com> Date: Tue, 18 Jun 2024 14:23:14 +0600 Subject: [PATCH] Hide X-Powered-By header (#239) --- app/SSH/Services/Webserver/scripts/nginx/php-vhost-ssl.conf | 1 + app/SSH/Services/Webserver/scripts/nginx/php-vhost.conf | 1 + scripts/install.sh | 1 + 3 files changed, 3 insertions(+) diff --git a/app/SSH/Services/Webserver/scripts/nginx/php-vhost-ssl.conf b/app/SSH/Services/Webserver/scripts/nginx/php-vhost-ssl.conf index 7e0186d..480f381 100755 --- a/app/SSH/Services/Webserver/scripts/nginx/php-vhost-ssl.conf +++ b/app/SSH/Services/Webserver/scripts/nginx/php-vhost-ssl.conf @@ -27,6 +27,7 @@ server { fastcgi_pass unix:/var/run/php/php__php_version__-fpm.sock; fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; include fastcgi_params; + fastcgi_hide_header X-Powered-By; } location ~ /\.(?!well-known).* { diff --git a/app/SSH/Services/Webserver/scripts/nginx/php-vhost.conf b/app/SSH/Services/Webserver/scripts/nginx/php-vhost.conf index ab89621..5734f58 100755 --- a/app/SSH/Services/Webserver/scripts/nginx/php-vhost.conf +++ b/app/SSH/Services/Webserver/scripts/nginx/php-vhost.conf @@ -23,6 +23,7 @@ server { fastcgi_pass unix:/var/run/php/php__php_version__-fpm.sock; fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; include fastcgi_params; + fastcgi_hide_header X-Powered-By; } location ~ /\.(?!well-known).* { diff --git a/scripts/install.sh b/scripts/install.sh index f73d1e9..f900d07 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -134,6 +134,7 @@ server { fastcgi_pass unix:/var/run/php/php${V_PHP_VERSION}-fpm.sock; fastcgi_param SCRIPT_FILENAME \$realpath_root\$fastcgi_script_name; include fastcgi_params; + fastcgi_hide_header X-Powered-By; } location ~ /\.(?!well-known).* {