We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bc8b601 commit 5841ec5Copy full SHA for 5841ec5
1 file changed
typedb/localstack_typedb/utils/h2_proxy.py
@@ -55,13 +55,19 @@ def close(self):
55
pass
56
57
58
+patched_connection = False
59
+
60
def apply_http2_patches_for_grpc_support(
61
target_host: str, target_port: int, request_matcher: ProxyRequestMatcher
62
):
63
"""
64
Apply some patches to proxy incoming gRPC requests and forward them to a target port.
65
Note: this is a very brute-force approach and needs to be fixed/enhanced over time!
66
67
+ LOG.debug(f"Enabling proxying to backend {target_host}:{target_port}")
68
+ global patched_connection
69
+ assert not patched_connection, "It is not safe to patch H2Connection twice with this function"
70
+ patched_connection = True
71
72
class ForwardingBuffer:
73
0 commit comments