Pass service name as host HTTP header to sidecar 83/57983/3
authorHuabing Zhao <zhaohuabing@gmail.com>
Mon, 30 Jul 2018 09:26:51 +0000 (09:26 +0000)
committerHuabing Zhao <zhaohuabing@gmail.com>
Mon, 30 Jul 2018 09:36:56 +0000 (09:36 +0000)
In order to let the envoy sidcar find the correct service provider,
the service name must be provided in the 'host' HTTP header.

Change-Id: I242ba5cea50a0914f2d5a691efae64c72d970bb3
Issue-ID: MSB-228
Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
openresty-ext/src/assembly/resources/openresty/nginx/msb-enabled/msb.conf

index 3e7038b..bb98462 100644 (file)
 #
 
 #the maximum allowed size of the client request body,current 10G
-client_max_body_size 10240m; 
+client_max_body_size 10240m;
 client_body_buffer_size 128k;
-       
+
 #set conf for proxy pass
 proxy_connect_timeout 5s;
 proxy_read_timeout 1200s;
 proxy_send_timeout 1200s;
 proxy_set_header X-Real-IP $remote_addr;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-proxy_set_header Host $host:$server_port;
+#proxy_set_header Host $host:$server_port;
+proxy_set_header Host $svc_name;
 proxy_buffers 4 16k;
 proxy_http_version 1.1;
 proxy_set_header Connection "";