Skip to content

Update dev#83

Merged
SteakFisher merged 2 commits into
devfrom
main
Jun 10, 2026
Merged

Update dev#83
SteakFisher merged 2 commits into
devfrom
main

Conversation

@SteakFisher

Copy link
Copy Markdown
Member

No description provided.

@SteakFisher SteakFisher merged commit 02f92fe into dev Jun 10, 2026
2 checks passed
@greptile-apps

greptile-apps Bot commented Jun 10, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates the Envoy proxy configuration with two additions: structured JSON access logging to stdout, and the grpc_web HTTP filter for gRPC-Web protocol translation.

  • Access logging: Adds a FileAccessLog to /dev/stdout with a rich JSON format capturing request metadata (method, path, protocol, gRPC status, Cloudflare headers, upstream info, and duration).
  • gRPC-Web filter: Inserts envoy.filters.http.grpc_web before the router filter to enable gRPC-Web-to-gRPC translation. The existing content-type prefix routing (application/grpc) will correctly route gRPC-Web requests (application/grpc-web) to grpc_backend since application/grpc-web starts with application/grpc.

Confidence Score: 4/5

The 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

Filename Overview
envoy/envoy.yaml Adds JSON access logging and grpc_web filter; routing is compatible with gRPC-Web content types, but CORS is absent and access log block has an indentation inconsistency.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    Client([Browser / SDK Client]) -->|":8060"| Envoy[Envoy Listener]
    Envoy --> AL[Access Logger\nJSON → /dev/stdout]
    Envoy --> RouteMatch{Route Match\ncontent-type prefix}
    RouteMatch -->|"application/grpc*\n(grpc + grpc-web)"| GrpcWebFilter[grpc_web filter\ntranslates gRPC-Web → gRPC]
    RouteMatch -->|other| HTTPBackend[http_backend\n127.0.0.1:8070]
    GrpcWebFilter --> RouterFilter[router filter]
    RouterFilter --> GRPCBackend[grpc_backend\n127.0.0.1:8069\nHTTP/2]
    RouterFilter --> HTTPBackend
Loading

Reviews (1): Last reviewed commit: "fix: revert proto submodule to d9ceee6 (..." | Re-trigger Greptile

Comment thread envoy/envoy.yaml
Comment on lines +61 to +63
- name: envoy.filters.http.grpc_web
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.grpc_web.v3.GrpcWeb

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

Comment thread envoy/envoy.yaml
Comment on lines +15 to +16
typed_config:
"@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

Suggested change
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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants