Complete the code to enable gRPC proxying in NGINX.
location /grpc-service/ {
grpc_pass [1];
}The grpc_pass directive requires the grpc:// scheme to proxy gRPC traffic correctly.
Complete the code to set the HTTP version required for gRPC proxying.
location /grpc-service/ {
grpc_pass grpc://localhost:50051;
proxy_http_version [1];
}NGINX requires proxy_http_version 1.1; to support gRPC proxying because HTTP/1.1 supports the necessary features.
Fix the error in the code to correctly set the gRPC timeout.
location /grpc-service/ {
grpc_pass grpc://localhost:50051;
proxy_connect_timeout [1];
}Timeout values in NGINX must include a time unit like s for seconds. 30s is correct.
Fill both blanks to add headers needed for gRPC proxying.
location /grpc-service/ {
grpc_pass grpc://localhost:50051;
proxy_set_header [1] $http_host;
proxy_set_header [2] $http_upgrade;
}Setting Host and Upgrade headers is required for proper gRPC proxying.
Fill all three blanks to configure NGINX for secure gRPC proxying with TLS.
location /grpc-secure/ {
grpc_pass [1];
proxy_ssl_certificate [2];
proxy_ssl_certificate_key [3];
}Use grpcs:// for secure gRPC proxying and provide paths to the client certificate and key files.