Skip to content

Commit c74de0e

Browse files
committed
Fixed case of unconfigured WOPI bridge, cf. PR #1234
1 parent 7c9a6b0 commit c74de0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/grpc/services/appprovider/appprovider.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ func (s *service) OpenFileInAppProvider(ctx context.Context, req *providerpb.Ope
261261

262262
// In case of applications served by the WOPI bridge, resolve the URL and go to the app
263263
// Note that URL matching is performed via string matching, not via IP resolution: may need to fix this
264-
if strings.Contains(appProviderURL, s.conf.WopiBrURL) {
264+
if len(s.conf.WopiBrURL) > 0 && strings.Contains(appProviderURL, s.conf.WopiBrURL) {
265265
httpClient := rhttp.GetHTTPClient(
266266
rhttp.Context(ctx),
267267
rhttp.Timeout(time.Duration(5*int64(time.Second))),

0 commit comments

Comments
 (0)