Skip to content

Commit e7b7cea

Browse files
authored
feat: make it possible to start the collaboration service in the single process (#1569)
* feat: make it possible to start the collaboration service in the single process * feat: add proxy policy
1 parent a2f59ce commit e7b7cea

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

opencloud/pkg/runtime/service/service.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import (
3030
authmachine "github.com/opencloud-eu/opencloud/services/auth-machine/pkg/command"
3131
authservice "github.com/opencloud-eu/opencloud/services/auth-service/pkg/command"
3232
clientlog "github.com/opencloud-eu/opencloud/services/clientlog/pkg/command"
33+
collaboration "github.com/opencloud-eu/opencloud/services/collaboration/pkg/command"
3334
eventhistory "github.com/opencloud-eu/opencloud/services/eventhistory/pkg/command"
3435
frontend "github.com/opencloud-eu/opencloud/services/frontend/pkg/command"
3536
gateway "github.com/opencloud-eu/opencloud/services/gateway/pkg/command"
@@ -328,6 +329,11 @@ func NewService(ctx context.Context, options ...Option) (*Service, error) {
328329
cfg.Audit.Commons = cfg.Commons
329330
return audit.Execute(cfg.Audit)
330331
})
332+
areg(opts.Config.Collaboration.Service.Name, func(ctx context.Context, cfg *occfg.Config) error {
333+
cfg.Collaboration.Context = ctx
334+
cfg.Collaboration.Commons = cfg.Commons
335+
return collaboration.Execute(cfg.Collaboration)
336+
})
331337
areg(opts.Config.Policies.Service.Name, func(ctx context.Context, cfg *occfg.Config) error {
332338
cfg.Policies.Context = ctx
333339
cfg.Policies.Commons = cfg.Commons

services/collaboration/pkg/helpers/discovery.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,6 @@ func GetAppURLs(cfg *config.Config, logger log.Logger) (map[string]map[string]st
9292

9393
httpResp, err := httpClient.Get(wopiAppUrl)
9494
if err != nil {
95-
logger.Error().
96-
Err(err).
97-
Str("WopiAppUrl", wopiAppUrl).
98-
Msg("WopiDiscovery: failed to access wopi app url")
9995
return nil, err
10096
}
10197

services/proxy/pkg/config/defaults/defaultconfig.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,12 @@ func DefaultPolicies() []config.Policy {
272272
Endpoint: "/auth-app/tokens",
273273
Service: "eu.opencloud.web.auth-app",
274274
},
275+
{
276+
Endpoint: "/wopi",
277+
Service: "eu.opencloud.web.collaboration.Collabora",
278+
Unprotected: true,
279+
SkipXAccessToken: true,
280+
},
275281
},
276282
},
277283
}

0 commit comments

Comments
 (0)