From 3a83f3bb4d64dcb79ffc8dcb57e2dfb23d5d9fe8 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Tue, 28 Jul 2020 17:34:06 +0200 Subject: [PATCH] Route user provisioning api to ocis-ocs --- config/proxy-example.json | 21 ++++++++++++++------- pkg/proxy/proxy.go | 2 +- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/config/proxy-example.json b/config/proxy-example.json index b8e5063cb..28fd674de 100644 --- a/config/proxy-example.json +++ b/config/proxy-example.json @@ -7,7 +7,9 @@ "insecure": true }, "policy_selector": { - "static": {"policy" : "reva"} + "static": { + "policy": "reva" + } }, "policies": [ { @@ -33,6 +35,11 @@ "endpoint": "/ocs/", "backend": "http://localhost:9140" }, + { + "type": "regex", + "endpoint": "/ocs/v[12].php/cloud/user", + "backend": "http://localhost:9110" + }, { "endpoint": "/remote.php/", "backend": "http://localhost:9140" @@ -58,13 +65,13 @@ "backend": "http://localhost:9140" }, { - "endpoint": "/api/v0/accounts", - "backend": "http://localhost:9181" - }, - { + "endpoint": "/api/v0/accounts", + "backend": "http://localhost:9181" + }, + { "endpoint": "/accounts.js", - "backend": "http://localhost:9181" - } + "backend": "http://localhost:9181" + } ] }, { diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index fa43b0241..b5641c7d0 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -255,7 +255,7 @@ func defaultPolicies() []config.Policy { }, { Type: config.RegexRoute, - Endpoint: "/ocs/v[12].php/cloud/user/signing-key", + Endpoint: "/ocs/v[12].php/cloud/user",// we have `user` and `users` in ocis-ocs Backend: "http://localhost:9110", }, {