Skip to content

GrpcWeb

Converting gRPC Web requests to HTTP/2 gRPC requests.

The GrpcWeb middleware converts gRPC Web requests to HTTP/2 gRPC requests before forwarding them to the backends.

Tip

Please note, that Traefik needs to communicate using gRPC with the backends (h2c or HTTP/2 over TLS). Check out the gRPC user guide for more details.

Configuration Examples

labels:
  - "traefik.http.middlewares.test-grpcweb.grpcweb.allowOrigins=*"
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
  name: test-grpcweb
spec:
  grpcWeb:
    allowOrigins:
      - "*"
- "traefik.http.middlewares.test-grpcweb.grpcWeb.allowOrigins=*"
http:
  middlewares:
    test-grpcweb:
      grpcWeb:
        allowOrigins:
          - "*"
[http.middlewares]
  [http.middlewares.test-grpcweb.grpcWeb]
    allowOrigins = ["*"]

Configuration Options

allowOrigins

The allowOrigins contains the list of allowed origins. A wildcard origin * can also be configured to match all requests.

More information including how to use the settings can be found at: