location /dns-query { if ( $request_method !~ ^(GET|POST|HEAD)$ ) { return 501; } proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_redirect off; proxy_buffering off; grpc_pass grpc://127.0.0.1:4443; }