diff --git a/cmd/P4wnP1_service/P4wnP1_service.go b/cmd/P4wnP1_service/P4wnP1_service.go index 0d0faf3..c79be49 100644 --- a/cmd/P4wnP1_service/P4wnP1_service.go +++ b/cmd/P4wnP1_service/P4wnP1_service.go @@ -40,7 +40,7 @@ func main() { */ // ToDo: The webroot has to be changed to /usr/local/P4wnP1/www - service.StartRpcServerAndWeb("0.0.0.0", "50051", "80", "/usr/local/P4wnP1/www") //start gRPC service + service.StartRpcServerAndWeb("0.0.0.0", "50051", "8000", "/usr/local/P4wnP1/www") //start gRPC service //Indicate servers up with LED blink count 1 state.Led.SetLed(&pb.LEDSettings{1}) diff --git a/service/rpc_server.go b/service/rpc_server.go index c916ce3..4a3ba4e 100644 --- a/service/rpc_server.go +++ b/service/rpc_server.go @@ -432,6 +432,7 @@ func StartRpcServerAndWeb(host string, gRPCPort string, webPort string, absWebRo grpc_web_srv := grpcweb.WrapServer(s, grpcweb.WithWebsockets(true)) //Wrap server to improbable grpc-web with websockets //define a handler for a HTTP web server using the gRPC-web proxy http_gRPC_web_handler := func(resp http.ResponseWriter, req *http.Request) { + //fmt.Printf("===========\nRequest: %s\n %v\n=============\n", req) if strings.Contains(req.Header.Get("Content-Type"), "application/grpc") || req.Method == "OPTIONS" || strings.Contains(req.Header.Get("Sec-Websocket-Protocol"), "grpc-websockets") {