Skip to content

Instantly share code, notes, and snippets.

@Jared-Prime
Created March 9, 2018 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jared-Prime/9d51acbadac5ecd34fe27996334923f9 to your computer and use it in GitHub Desktop.
Save Jared-Prime/9d51acbadac5ecd34fe27996334923f9 to your computer and use it in GitHub Desktop.
sketch of what a gRPC backend to nginx might look like based off https://github.com/grpc/grpc.github.io/issues/230#issuecomment-328827358
server {
listen 8443 ssl http2;
listen [::]:8443 ssl http2;
ssl_certificate /some/place/server.crt;
ssl_certificate_key /some/place/server.key;
}
location /internal {
proxy_http_version 2.0;
proxy_pass http://$some_ip:50051;
proxy_set_header X-REAL-IP $remote_addr;
proxy_request_buffering off;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment