From 8f68c251770d483781344d0abdd6cc78f44df9e6 Mon Sep 17 00:00:00 2001 From: TheThomaas Date: Sun, 6 Sep 2026 11:23:55 +0000 Subject: [PATCH] revert ab5b9f4d9737a372dfb38ccc0feab3e99618e375 revert Actualiser cookcli/rootfs/etc/nginx/nginx.conf --- cookcli/rootfs/etc/nginx/nginx.conf | 38 ++--------------------------- 1 file changed, 2 insertions(+), 36 deletions(-) diff --git a/cookcli/rootfs/etc/nginx/nginx.conf b/cookcli/rootfs/etc/nginx/nginx.conf index be73cf0..1442175 100644 --- a/cookcli/rootfs/etc/nginx/nginx.conf +++ b/cookcli/rootfs/etc/nginx/nginx.conf @@ -24,49 +24,15 @@ http { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-Host $host; - proxy_set_header X-Forwarded-Port $server_port; - # Désactiver le buffering - proxy_buffering off; - - # Proxy vers CookCLI + # Proxy simple vers CookCLI location / { proxy_pass http://127.0.0.1:9081; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; - - # --- RÉÉCRITURE DES URLs POUR L'INGRESS --- - # Capture le chemin Ingress depuis les headers - set $ingress_path $http_x_forwarded_prefix; - if ($ingress_path = "") { - set $ingress_path ""; - } - - # Sub_filter pour réécrire les URLs absolues - sub_filter_once off; - sub_filter_types text/html text/css application/javascript; - - # Réécriture des URLs de base - sub_filter 'href="/' 'href="$ingress_path/'; - sub_filter 'src="/' 'src="$ingress_path/'; - sub_filter 'action="/' 'action="$ingress_path/'; - - # Réécriture spécifique pour les chemins courants - sub_filter '"/static/' '"$ingress_path/static/'; - sub_filter '"/assets/' '"$ingress_path/assets/'; - sub_filter '"/css/' '"$ingress_path/css/'; - sub_filter '"/js/' '"$ingress_path/js/'; - - # Si l'application utilise des chemins relatifs, les forcer - sub_filter '