Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: grpc endpoint prefix for web and native #698

Closed

Conversation

GuillermoDLCO
Copy link

Description

There are some prefixes that we can assign in gateways to redirect to our services.
This feature enable an option prefixPath for that purpose

gRPC Native

    ClientChannel(
        host,
        port: port,
        prefixPath: nativePrefixPath,
        options: ChannelOptions(
          connectTimeout: const Duration(seconds: 6),
          connectionTimeout: const Duration(seconds: 6),
          idleTimeout: const Duration(seconds: 6),
          codecRegistry:
              CodecRegistry(codecs: const [GzipCodec(), IdentityCodec()]),
        ),
      )

gRPC Web

      GrpcWebClientChannel.xhr(
        Uri.parse('$host:$port'),
        prefixPath: webPrefixPath,
      );

* feat: comment out trailers validation

* fix(call.dart): uncomment code block to handle trailers if not completed to ensure proper error handling and processing of status error

* fix(call.dart): handle double trailers with grpc-status and grpc-message for Apisix to prevent errors and improve error handling
… to allow setting a prefix path for all requests

feat(http2_connection.dart): add support for prefixPath in Http2ClientConnection to include a prefix path in request paths
feat(xhr_transport.dart): update requestUri construction to include prefixPath in XhrClientConnection
feat(web_channel.dart): add validation for prefixPath in GrpcWebClientChannel to ensure it starts and ends with /
Copy link

linux-foundation-easycla bot commented Apr 12, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@GuillermoDLCO GuillermoDLCO reopened this Apr 12, 2024
@GuillermoDLCO GuillermoDLCO deleted the feature/grpc-endpoint-prefix branch April 14, 2024 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant