Update dev#83
Conversation
Signed-off-by: Devyash Saini <dysaini2004@gmail.com>
Greptile SummaryThis PR updates the Envoy proxy configuration with two additions: structured JSON access logging to stdout, and the
Confidence Score: 4/5The change is safe to merge for the existing Node.js gRPC SDK clients; the CORS gap only matters if browser-based gRPC-Web clients are planned. The routing logic correctly handles gRPC-Web content types (prefix application/grpc-web matches the existing application/grpc prefix rule), and the access log format is well-formed. The only open question is whether browser clients are intended to use the new grpc_web filter — if they are, the missing CORS filter would block all cross-origin preflight requests at the browser level. envoy/envoy.yaml — verify whether browser-based gRPC-Web clients need CORS support and fix the indentation inconsistency in the access log block. Important Files Changed
|
| - name: envoy.filters.http.grpc_web | ||
| typed_config: | ||
| "@type": type.googleapis.com/envoy.extensions.filters.http.grpc_web.v3.GrpcWeb |
There was a problem hiding this comment.
Missing CORS filter for browser gRPC-Web clients
The grpc_web filter is typically used to support browser-based gRPC-Web clients. If any browser connects to this endpoint cross-origin, the missing envoy.filters.http.cors filter will cause all preflight (OPTIONS) requests to fail with a CORS error before the grpc_web filter can handle them. The Envoy CORS filter must be placed before the grpc_web filter in the chain. If only server-side Node.js/native gRPC clients (like the @grpc/grpc-js-based SDK in scrawn.js) are used, this is not a concern.
| typed_config: | ||
| "@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog |
There was a problem hiding this comment.
The
typed_config body under the access logger uses 4-space indentation while every other typed_config block in this file uses 2-space indentation. While valid YAML, it's inconsistent and makes the file harder to read.
| typed_config: | |
| "@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog | |
| typed_config: | |
| "@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
No description provided.