mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-29 07:19:40 -05:00
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
This commit is contained in:
@@ -30,6 +30,7 @@ import (
|
||||
authmachine "github.com/opencloud-eu/opencloud/services/auth-machine/pkg/command"
|
||||
authservice "github.com/opencloud-eu/opencloud/services/auth-service/pkg/command"
|
||||
clientlog "github.com/opencloud-eu/opencloud/services/clientlog/pkg/command"
|
||||
collaboration "github.com/opencloud-eu/opencloud/services/collaboration/pkg/command"
|
||||
eventhistory "github.com/opencloud-eu/opencloud/services/eventhistory/pkg/command"
|
||||
frontend "github.com/opencloud-eu/opencloud/services/frontend/pkg/command"
|
||||
gateway "github.com/opencloud-eu/opencloud/services/gateway/pkg/command"
|
||||
@@ -328,6 +329,11 @@ func NewService(ctx context.Context, options ...Option) (*Service, error) {
|
||||
cfg.Audit.Commons = cfg.Commons
|
||||
return audit.Execute(cfg.Audit)
|
||||
})
|
||||
areg(opts.Config.Collaboration.Service.Name, func(ctx context.Context, cfg *occfg.Config) error {
|
||||
cfg.Collaboration.Context = ctx
|
||||
cfg.Collaboration.Commons = cfg.Commons
|
||||
return collaboration.Execute(cfg.Collaboration)
|
||||
})
|
||||
areg(opts.Config.Policies.Service.Name, func(ctx context.Context, cfg *occfg.Config) error {
|
||||
cfg.Policies.Context = ctx
|
||||
cfg.Policies.Commons = cfg.Commons
|
||||
|
||||
@@ -92,10 +92,6 @@ func GetAppURLs(cfg *config.Config, logger log.Logger) (map[string]map[string]st
|
||||
|
||||
httpResp, err := httpClient.Get(wopiAppUrl)
|
||||
if err != nil {
|
||||
logger.Error().
|
||||
Err(err).
|
||||
Str("WopiAppUrl", wopiAppUrl).
|
||||
Msg("WopiDiscovery: failed to access wopi app url")
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
@@ -272,6 +272,12 @@ func DefaultPolicies() []config.Policy {
|
||||
Endpoint: "/auth-app/tokens",
|
||||
Service: "eu.opencloud.web.auth-app",
|
||||
},
|
||||
{
|
||||
Endpoint: "/wopi",
|
||||
Service: "eu.opencloud.web.collaboration.Collabora",
|
||||
Unprotected: true,
|
||||
SkipXAccessToken: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user