Skip to content

Commit a481ac4

Browse files
committed
attempting switch to secure_channel
1 parent fbdb428 commit a481ac4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

https-frontend/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818

1919
# initialize the gRPC channel
2020
addr = os.getenv('GRPC_SERVER_ADDRESS', 'localhost:50051')
21-
channel = grpc.insecure_channel(addr)
21+
creds = grpc.ssl_channel_credentials(open('/etc/ssl/certs/ca-certificates.crt').read())
22+
channel = grpc.secure_channel(addr, creds)
2223
greeter = greet_pb2_grpc.GreeterStub(channel)
2324

2425
@app.route('/hello', methods=['GET'])

0 commit comments

Comments
 (0)