From ae3fedb6450012d0dc0486e294ffc0d3e9b319eb Mon Sep 17 00:00:00 2001 From: Pablo Fraile Alonso Date: Tue, 10 Oct 2023 09:33:38 +0200 Subject: [PATCH] correct proxY --- nginx.conf | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/nginx.conf b/nginx.conf index 27f69b4..1aa9ff2 100644 --- a/nginx.conf +++ b/nginx.conf @@ -14,10 +14,13 @@ http { # API route location /api { - proxy_pass http://localhost:8000; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + rewrite ^/api/(.*) /$1 break; + proxy_set_header Host $http_host; + proxy_pass http://127.0.0.1:8000; + # proxy_pass http://127.0.0.1:8000; + # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + # proxy_set_header Host $http_host; + # proxy_http_version 1.1; } # Root route