mirror of
https://github.com/linka-cloud/grpc.git
synced 2025-06-22 09:12:28 +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:
@ -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)
|
||||
|
Reference in New Issue
Block a user