Closed matze closed 1 year ago
Hi.
I bump the question.
It would be great to have some customization options. I'm especially interested In adding ca_certificate
and user_agent
similar to tonic::transport::Channel:
Channel::builder(Uri::from_str(addr)?)
.tls_config(
ClientTlsConfig::new()
.domain_name(host)
.ca_certificate(cert),
)
.unwrap()
.user_agent(user_agent)
.unwrap()
.connect()
.await
Hi. Thanks for creating the issue.
I'm not sure what exactly is your usecase. But, can you refer to this PR for TLS config: https://github.com/devashishdxt/tonic-web-wasm-client/pull/14/files
In a nutshell, you can setup everything on you server. But, it is not possible to provide custom configuration in client via code as we use fetch
API on browsers. You'll have to manually add certificates in your browser.
Closing this issue. Please reopen if you have any more questions.
The client works reasonably well but we do use mTLS to authorize access to gRPC calls. Or is it a general limitation of grpc-web?