Use embeddable ocdav go micro service (#3397)

* allow proxy to route to micro service

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* use go micre ocdav service instead of reva frontend

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* add missing gateway default config

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* update reva branch for testing

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* add changelog

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* add missing comands

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* bump reva version

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* tidy

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* bump reva again

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* a blind mans config change

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* add ocdav to must start extensions

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* fail when neither backend nor service is set

Signed-off-by: jkoberg <jkoberg@owncloud.com>

Co-authored-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
Jörn Friedrich Dreyer
2022-04-13 17:04:38 +02:00
committed by Christian Richter
co-authored by jkoberg
parent ae4c72d1c7
commit 40a4c5070a
16 changed files with 304 additions and 63 deletions
+8 -5
View File
@@ -43,12 +43,15 @@ type Policy struct {
Routes []Route `yaml:"routes"`
}
// Route define forwarding routes
// Route defines forwarding routes
type Route struct {
Type RouteType `yaml:"type"`
Endpoint string `yaml:"endpoint"`
Backend string `yaml:"backend"`
ApacheVHost bool `yaml:"apache-vhost"`
Type RouteType `yaml:"type"`
Endpoint string `yaml:"endpoint"`
// Backend is a static URL to forward the request to
Backend string `yaml:"backend"`
// Service name to look up in the registry
Service string `yaml:"service"`
ApacheVHost bool `yaml:"apache-vhost"`
}
// RouteType defines the type of a route
@@ -96,30 +96,34 @@ func DefaultPolicies() []config.Policy {
},
{
Endpoint: "/remote.php/",
Backend: "http://localhost:9140",
Service: "ocdav",
},
{
Endpoint: "/dav/",
Backend: "http://localhost:9140",
Service: "ocdav",
},
{
Endpoint: "/webdav/",
Backend: "http://localhost:9140",
Service: "ocdav",
},
{
Endpoint: "/status.php",
Backend: "http://localhost:9140",
Service: "ocdav",
},
{
Endpoint: "/index.php/",
Backend: "http://localhost:9140",
Service: "ocdav",
},
{
Endpoint: "/apps/",
Service: "ocdav",
},
{
Endpoint: "/data",
Backend: "http://localhost:9140",
},
{
Endpoint: "/app/",
Endpoint: "/app/", // /app or /apps? ocdav only handles /apps
Backend: "http://localhost:9140",
},
{