diff --git a/nginx.conf b/nginx.conf index daed5e5..41367bd 100644 --- a/nginx.conf +++ b/nginx.conf @@ -14,12 +14,26 @@ http { server { listen 5000; - proxy_pass localhost:5001; + + location / { + proxy_pass http://localhost:5001; + 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; + } } server { listen 80; - proxy_pass localhost:33360; # TODO: change to NodePort of helloworld within kubernetes + + location / { + proxy_pass http://localhost:33360; # TODO: change to NodePort of helloworld within kubernetes + 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; + } } }