From 2ae41da5cd1517bb0f65e0d15428e20763ab20bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Fri, 10 Jul 2020 15:16:13 +0200 Subject: [PATCH] Add Accounts UI routes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- changelog/unreleased/add-accounts-ui-routes.md | 9 +++++++++ pkg/proxy/proxy.go | 10 ++++++++++ 2 files changed, 19 insertions(+) create mode 100644 changelog/unreleased/add-accounts-ui-routes.md diff --git a/changelog/unreleased/add-accounts-ui-routes.md b/changelog/unreleased/add-accounts-ui-routes.md new file mode 100644 index 0000000..07ac9f9 --- /dev/null +++ b/changelog/unreleased/add-accounts-ui-routes.md @@ -0,0 +1,9 @@ +Enhancement: Add Accounts UI routes + +The accounts service has a ui that requires routing +- `/api/v0/accounts` and +- `/accounts.js` + +to http://localhost:9181 + +https://github.com/owncloud/ocis-proxy/pull/65 diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index 9835e6d..3f46820 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -282,6 +282,16 @@ func defaultPolicies() []config.Policy { Endpoint: "/data", Backend: "http://localhost:9140", }, + // if we were using the go micro api gateway we could look up the endpoint in the registry dynamically + { + Endpoint: "/api/v0/accounts", + Backend: "http://localhost:9181", + }, + // TODO the lookup needs a better mechanism + { + Endpoint: "/accounts.js", + Backend: "http://localhost:9181", + }, }, }, {