mirror of
https://github.com/linka-cloud/grpc.git
synced 2024-11-24 11:56:26 +00:00
react: export REACT_ENDPOINT env var, recovery interceptor: remove panicing client handlers
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
parent
d5210f8db5
commit
7c3a338748
@ -22,11 +22,3 @@ func (i *recovery) UnaryServerInterceptor() grpc.UnaryServerInterceptor {
|
||||
func (i *recovery) StreamServerInterceptor() grpc.StreamServerInterceptor {
|
||||
return grpc_recovery.StreamServerInterceptor(i.opts...)
|
||||
}
|
||||
|
||||
func (i *recovery) UnaryClientInterceptor() grpc.UnaryClientInterceptor {
|
||||
panic("not implemented")
|
||||
}
|
||||
|
||||
func (i *recovery) StreamClientInterceptor() grpc.StreamClientInterceptor {
|
||||
panic("not implemented")
|
||||
}
|
||||
|
@ -24,8 +24,12 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
const (
|
||||
EndpointEnv = "REACT_ENDPOINT"
|
||||
)
|
||||
|
||||
func NewHandler(dir embed.FS, subpath string) (http.Handler, error) {
|
||||
if e := os.Getenv("REACT_ENDPOINT"); e != "" {
|
||||
if e := os.Getenv(EndpointEnv); e != "" {
|
||||
return newProxy(e)
|
||||
}
|
||||
return newStatic(dir, subpath)
|
||||
|
Loading…
Reference in New Issue
Block a user