diff --git a/proxy/pkg/config/config.go b/proxy/pkg/config/config.go index dafa8a799..18a20ba1d 100644 --- a/proxy/pkg/config/config.go +++ b/proxy/pkg/config/config.go @@ -256,10 +256,6 @@ func DefaultConfig() *Config { } func defaultPolicies() []Policy { - const idpBackend = "http://localhost:9130" - const revaBackend = "http://localhost:9140" - const namedDemoBackend = "https://demo.owncloud.com" - return []Policy{ { Name: "ocis", @@ -270,19 +266,19 @@ func defaultPolicies() []Policy { }, { Endpoint: "/.well-known/", - Backend: idpBackend, + Backend: "http://localhost:9130", }, { Endpoint: "/konnect/", - Backend: idpBackend, + Backend: "http://localhost:9130", }, { Endpoint: "/signin/", - Backend: idpBackend, + Backend: "http://localhost:9130", }, { Endpoint: "/archiver", - Backend: revaBackend, + Backend: "http://localhost:9140", }, { Type: RegexRoute, @@ -291,7 +287,7 @@ func defaultPolicies() []Policy { }, { Endpoint: "/ocs/", - Backend: revaBackend, + Backend: "http://localhost:9140", }, { Type: QueryRoute, @@ -300,31 +296,31 @@ func defaultPolicies() []Policy { }, { Endpoint: "/remote.php/", - Backend: revaBackend, + Backend: "http://localhost:9140", }, { Endpoint: "/dav/", - Backend: revaBackend, + Backend: "http://localhost:9140", }, { Endpoint: "/webdav/", - Backend: revaBackend, + Backend: "http://localhost:9140", }, { Endpoint: "/status.php", - Backend: revaBackend, + Backend: "http://localhost:9140", }, { Endpoint: "/index.php/", - Backend: revaBackend, + Backend: "http://localhost:9140", }, { Endpoint: "/data", - Backend: revaBackend, + Backend: "http://localhost:9140", }, { Endpoint: "/app/", - Backend: revaBackend, + Backend: "http://localhost:9140", }, { Endpoint: "/graph/", @@ -339,6 +335,7 @@ func defaultPolicies() []Policy { Endpoint: "/api/v0/accounts", Backend: "http://localhost:9181", }, + // TODO the lookup needs a better mechanism { Endpoint: "/accounts.js", Backend: "http://localhost:9181", @@ -362,53 +359,53 @@ func defaultPolicies() []Policy { }, { Endpoint: "/.well-known/", - Backend: idpBackend, + Backend: "http://localhost:9130", }, { Endpoint: "/konnect/", - Backend: idpBackend, + Backend: "http://localhost:9130", }, { Endpoint: "/signin/", - Backend: idpBackend, + Backend: "http://localhost:9130", }, { Endpoint: "/archiver", - Backend: revaBackend, + Backend: "http://localhost:9140", }, { Endpoint: "/ocs/", - Backend: namedDemoBackend, + Backend: "https://demo.owncloud.com", ApacheVHost: true, }, { Endpoint: "/remote.php/", - Backend: namedDemoBackend, + Backend: "https://demo.owncloud.com", ApacheVHost: true, }, { Endpoint: "/dav/", - Backend: namedDemoBackend, + Backend: "https://demo.owncloud.com", ApacheVHost: true, }, { Endpoint: "/webdav/", - Backend: namedDemoBackend, + Backend: "https://demo.owncloud.com", ApacheVHost: true, }, { Endpoint: "/status.php", - Backend: namedDemoBackend, + Backend: "https://demo.owncloud.com", ApacheVHost: true, }, { Endpoint: "/index.php/", - Backend: namedDemoBackend, + Backend: "https://demo.owncloud.com", ApacheVHost: true, }, { Endpoint: "/data", - Backend: namedDemoBackend, + Backend: "https://demo.owncloud.com", ApacheVHost: true, }, }, diff --git a/proxy/pkg/server/debug/server.go b/proxy/pkg/server/debug/server.go index e2a7f1e32..b4106f2a8 100644 --- a/proxy/pkg/server/debug/server.go +++ b/proxy/pkg/server/debug/server.go @@ -27,12 +27,10 @@ func Server(opts ...Option) (*http.Server, error) { ), nil } -const contentTypeHeader = "Content-Type" - // health implements the health check. func health(cfg *config.Config) func(http.ResponseWriter, *http.Request) { return func(w http.ResponseWriter, r *http.Request) { - w.Header().Set(contentTypeHeader, "text/plain") + w.Header().Set("Content-Type", "text/plain") w.WriteHeader(http.StatusOK) // TODO(tboerger): check if services are up and running @@ -46,7 +44,7 @@ func health(cfg *config.Config) func(http.ResponseWriter, *http.Request) { // ready implements the ready check. func ready(cfg *config.Config) func(http.ResponseWriter, *http.Request) { return func(w http.ResponseWriter, r *http.Request) { - w.Header().Set(contentTypeHeader, "text/plain") + w.Header().Set("Content-Type", "text/plain") w.WriteHeader(http.StatusOK) // TODO(tboerger): check if services are up and running @@ -60,7 +58,7 @@ func ready(cfg *config.Config) func(http.ResponseWriter, *http.Request) { // configDump implements the config dump func configDump(cfg *config.Config) func(http.ResponseWriter, *http.Request) { return func(w http.ResponseWriter, r *http.Request) { - w.Header().Set(contentTypeHeader, "application/json") + w.Header().Set("Content-Type", "application/json") b, err := json.Marshal(cfg) if err != nil { diff --git a/storage/pkg/config/config.go b/storage/pkg/config/config.go index 1e34e47b6..19c45739b 100644 --- a/storage/pkg/config/config.go +++ b/storage/pkg/config/config.go @@ -220,6 +220,7 @@ type StorageConfig struct { S3 DriverS3 S3NG DriverS3NG OCIS DriverOCIS + // TODO checksums ... figure out what that is supposed to do } // DriverCommon defines common driver configuration options.