From c74de0e6fe3643eb5a67a8e1a01636dd5448318f Mon Sep 17 00:00:00 2001 From: Giuseppe Lo Presti Date: Wed, 28 Oct 2020 11:21:03 +0100 Subject: [PATCH] Fixed case of unconfigured WOPI bridge, cf. PR #1234 --- internal/grpc/services/appprovider/appprovider.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/grpc/services/appprovider/appprovider.go b/internal/grpc/services/appprovider/appprovider.go index 7a2a55c393..fbc60f903b 100644 --- a/internal/grpc/services/appprovider/appprovider.go +++ b/internal/grpc/services/appprovider/appprovider.go @@ -261,7 +261,7 @@ func (s *service) OpenFileInAppProvider(ctx context.Context, req *providerpb.Ope // In case of applications served by the WOPI bridge, resolve the URL and go to the app // Note that URL matching is performed via string matching, not via IP resolution: may need to fix this - if strings.Contains(appProviderURL, s.conf.WopiBrURL) { + if len(s.conf.WopiBrURL) > 0 && strings.Contains(appProviderURL, s.conf.WopiBrURL) { httpClient := rhttp.GetHTTPClient( rhttp.Context(ctx), rhttp.Timeout(time.Duration(5*int64(time.Second))),