Veuillez m'aider à prévenir la "vulnérabilité d'injection d'en-tête d'hôte" dans le "fichier de configuration Nginx" donné
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
proxy_pass http://IP_1/;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
add_header Cache-Control "no-cache";
}
location /kuphubadmin/ {
proxy_pass http://IP_2/;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
add_header Cache-Control "no-cache";
}}
Remarque: Le serveur ci-dessus est utilisé comme serveur mandataire.