From 799b12b8dda00d860ad91a7143a8e06b2096d218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Mon, 13 May 2024 17:04:01 +0200 Subject: [PATCH] fix service names for userlog, graph, invitations, sse and web MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- services/graph/pkg/config/defaults/defaultconfig.go | 2 +- services/graph/pkg/server/http/server.go | 4 ++-- services/invitations/pkg/config/defaults/defaultconfig.go | 2 +- services/proxy/pkg/config/defaults/defaultconfig.go | 6 +++--- services/sse/pkg/server/http/server.go | 2 +- services/userlog/pkg/config/defaults/defaultconfig.go | 2 +- services/userlog/pkg/server/http/server.go | 4 ++-- services/web/pkg/server/http/server.go | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/services/graph/pkg/config/defaults/defaultconfig.go b/services/graph/pkg/config/defaults/defaultconfig.go index 6ac2e2ab13..efd95abebf 100644 --- a/services/graph/pkg/config/defaults/defaultconfig.go +++ b/services/graph/pkg/config/defaults/defaultconfig.go @@ -28,7 +28,7 @@ func DefaultConfig() *config.Config { }, HTTP: config.HTTP{ Addr: "127.0.0.1:9120", - Namespace: "com.owncloud.graph", + Namespace: "com.owncloud.web", Root: "/graph", CORS: config.CORS{ AllowedOrigins: []string{"*"}, diff --git a/services/graph/pkg/server/http/server.go b/services/graph/pkg/server/http/server.go index 4e7d02e2f4..133ecaae37 100644 --- a/services/graph/pkg/server/http/server.go +++ b/services/graph/pkg/server/http/server.go @@ -35,7 +35,7 @@ func Server(opts ...Option) (http.Service, error) { http.TLSConfig(options.Config.HTTP.TLS), http.Logger(options.Logger), http.Namespace(options.Config.HTTP.Namespace), - http.Name("graph"), + http.Name(options.Config.Service.Name), http.Version(version.GetString()), http.Address(options.Config.HTTP.Addr), http.Context(options.Context), @@ -66,7 +66,7 @@ func Server(opts ...Option) (http.Service, error) { middleware.TraceContext, chimiddleware.RequestID, middleware.Version( - "graph", + options.Config.Service.Name, version.GetString(), ), middleware.Logger( diff --git a/services/invitations/pkg/config/defaults/defaultconfig.go b/services/invitations/pkg/config/defaults/defaultconfig.go index 840ee0c7c3..49e2e1912e 100644 --- a/services/invitations/pkg/config/defaults/defaultconfig.go +++ b/services/invitations/pkg/config/defaults/defaultconfig.go @@ -24,7 +24,7 @@ func DefaultConfig() *config.Config { HTTP: config.HTTP{ Addr: "127.0.0.1:0", // :0 to pick any free local port Root: "/graph/v1.0", - Namespace: "com.owncloud.graph", + Namespace: "com.owncloud.web", CORS: config.CORS{ AllowedOrigins: []string{"https://localhost:9200"}, }, diff --git a/services/proxy/pkg/config/defaults/defaultconfig.go b/services/proxy/pkg/config/defaults/defaultconfig.go index eb4213881b..c638012ac4 100644 --- a/services/proxy/pkg/config/defaults/defaultconfig.go +++ b/services/proxy/pkg/config/defaults/defaultconfig.go @@ -142,7 +142,7 @@ func DefaultPolicies() []config.Policy { { // reroute oc10 notifications endpoint to userlog service Endpoint: "/ocs/v2.php/apps/notifications/api/v1/notifications", - Service: "com.owncloud.userlog.userlog", + Service: "com.owncloud.web.userlog", }, { Type: config.RegexRoute, @@ -238,11 +238,11 @@ func DefaultPolicies() []config.Policy { }, { Endpoint: "/graph/v1.0/invitations", - Service: "com.owncloud.graph.invitations", + Service: "com.owncloud.web.invitations", }, { Endpoint: "/graph/", - Service: "com.owncloud.graph.graph", + Service: "com.owncloud.web.graph", }, { Endpoint: "/api/v0/settings", diff --git a/services/sse/pkg/server/http/server.go b/services/sse/pkg/server/http/server.go index 1040c09240..a70f6b66b7 100644 --- a/services/sse/pkg/server/http/server.go +++ b/services/sse/pkg/server/http/server.go @@ -47,7 +47,7 @@ func Server(opts ...Option) (http.Service, error) { middlewares := []func(stdhttp.Handler) stdhttp.Handler{ chimiddleware.RequestID, middleware.Version( - "userlog", + options.Config.Service.Name, version.GetString(), ), middleware.Logger( diff --git a/services/userlog/pkg/config/defaults/defaultconfig.go b/services/userlog/pkg/config/defaults/defaultconfig.go index 6b174238a8..db89bf1415 100644 --- a/services/userlog/pkg/config/defaults/defaultconfig.go +++ b/services/userlog/pkg/config/defaults/defaultconfig.go @@ -44,7 +44,7 @@ func DefaultConfig() *config.Config { HTTP: config.HTTP{ Addr: "127.0.0.1:0", Root: "/", - Namespace: "com.owncloud.userlog", + Namespace: "com.owncloud.web", CORS: config.CORS{ AllowedOrigins: []string{"*"}, AllowedMethods: []string{"GET"}, diff --git a/services/userlog/pkg/server/http/server.go b/services/userlog/pkg/server/http/server.go index 7939e9d65c..2f3874a002 100644 --- a/services/userlog/pkg/server/http/server.go +++ b/services/userlog/pkg/server/http/server.go @@ -29,7 +29,7 @@ func Server(opts ...Option) (http.Service, error) { http.TLSConfig(options.Config.HTTP.TLS), http.Logger(options.Logger), http.Namespace(options.Config.HTTP.Namespace), - http.Name("userlog"), + http.Name(options.Config.Service.Name), http.Version(version.GetString()), http.Address(options.Config.HTTP.Addr), http.Context(options.Context), @@ -46,7 +46,7 @@ func Server(opts ...Option) (http.Service, error) { middlewares := []func(stdhttp.Handler) stdhttp.Handler{ chimiddleware.RequestID, middleware.Version( - "userlog", + options.Config.Service.Name, version.GetString(), ), middleware.Logger( diff --git a/services/web/pkg/server/http/server.go b/services/web/pkg/server/http/server.go index 6ecc0c774c..6b4d6c32ac 100644 --- a/services/web/pkg/server/http/server.go +++ b/services/web/pkg/server/http/server.go @@ -86,7 +86,7 @@ func Server(opts ...Option) (http.Service, error) { middleware.NoCache, webmid.SilentRefresh, middleware.Version( - "web", + options.Config.Service.Name, version.GetString(), ), middleware.Logger(