merge ocdav into frontend
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -28,7 +28,7 @@ policies:
|
||||
- endpoint: /
|
||||
service: eu.opencloud.web.web
|
||||
- endpoint: /dav/
|
||||
service: eu.opencloud.web.ocdav
|
||||
service: eu.opencloud.web.frontend
|
||||
```
|
||||
|
||||
For adding _additional_ routes to the default routes use:
|
||||
|
||||
@@ -223,33 +223,33 @@ func DefaultPolicies() []config.Policy {
|
||||
},
|
||||
{
|
||||
Endpoint: "/remote.php/",
|
||||
Service: "eu.opencloud.web.ocdav",
|
||||
Service: "eu.opencloud.web.frontend",
|
||||
},
|
||||
{
|
||||
Endpoint: "/dav/",
|
||||
Service: "eu.opencloud.web.ocdav",
|
||||
Service: "eu.opencloud.web.frontend",
|
||||
},
|
||||
{
|
||||
Endpoint: "/webdav/",
|
||||
Service: "eu.opencloud.web.ocdav",
|
||||
Service: "eu.opencloud.web.frontend",
|
||||
},
|
||||
{
|
||||
Endpoint: "/status",
|
||||
Service: "eu.opencloud.web.ocdav",
|
||||
Service: "eu.opencloud.web.frontend",
|
||||
Unprotected: true,
|
||||
},
|
||||
{
|
||||
Endpoint: "/status.php",
|
||||
Service: "eu.opencloud.web.ocdav",
|
||||
Service: "eu.opencloud.web.frontend",
|
||||
Unprotected: true,
|
||||
},
|
||||
{
|
||||
Endpoint: "/index.php/",
|
||||
Service: "eu.opencloud.web.ocdav",
|
||||
Service: "eu.opencloud.web.frontend",
|
||||
},
|
||||
{
|
||||
Endpoint: "/apps/",
|
||||
Service: "eu.opencloud.web.ocdav",
|
||||
Service: "eu.opencloud.web.frontend",
|
||||
},
|
||||
{
|
||||
Endpoint: "/data",
|
||||
@@ -262,7 +262,7 @@ func DefaultPolicies() []config.Policy {
|
||||
Unprotected: true,
|
||||
},
|
||||
{
|
||||
Endpoint: "/app/", // /app or /apps? ocdav only handles /apps
|
||||
Endpoint: "/app/", // /app or /apps? frontend only handles /apps
|
||||
Service: "eu.opencloud.web.frontend",
|
||||
},
|
||||
{
|
||||
|
||||
@@ -127,7 +127,7 @@ func TestRouter(t *testing.T) {
|
||||
Name: "default",
|
||||
Routes: []config.Route{
|
||||
{Type: config.PrefixRoute, Endpoint: "/web/unprotected/demo/", Backend: "http://web", Unprotected: true},
|
||||
{Type: config.PrefixRoute, Endpoint: "/dav", Backend: "http://ocdav"},
|
||||
{Type: config.PrefixRoute, Endpoint: "/dav", Backend: "http://frontend"},
|
||||
{Type: config.PrefixRoute, Method: "REPORT", Endpoint: "/dav", Backend: "http://opencloud-webdav"},
|
||||
},
|
||||
},
|
||||
@@ -138,7 +138,7 @@ func TestRouter(t *testing.T) {
|
||||
router := New(sel, policySelectorCfg, policies, log.NewLogger())
|
||||
|
||||
table := []matchertest{
|
||||
{method: "PROPFIND", endpoint: "/dav/files/demo/", target: "ocdav"},
|
||||
{method: "PROPFIND", endpoint: "/dav/files/demo/", target: "frontend"},
|
||||
{method: "REPORT", endpoint: "/dav/files/demo/", target: "opencloud-webdav"},
|
||||
{method: "GET", endpoint: "/web/unprotected/demo/", target: "web", unprotected: true},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user