Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Commit

Permalink
Merge pull request #65 from butonic/add-accounts-ui-routes
Browse files Browse the repository at this point in the history
Add Accounts UI routes
  • Loading branch information
butonic authored Jul 10, 2020
2 parents 3014f0d + 453fc37 commit fae244d
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 2 deletions.
9 changes: 9 additions & 0 deletions changelog/unreleased/add-accounts-ui-routes.md
Original file line number Diff line number Diff line change
@@ -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
10 changes: 9 additions & 1 deletion config/proxy-example-migration.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,15 @@
{
"endpoint": "/data",
"backend": "http://localhost:9140"
}
},
{
"endpoint": "/api/v0/accounts",
"backend": "http://localhost:9181"
},
{
"endpoint": "/accounts.js",
"backend": "http://localhost:9181"
}
]
},
{
Expand Down
10 changes: 9 additions & 1 deletion config/proxy-example.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,15 @@
{
"endpoint": "/data",
"backend": "http://localhost:9140"
}
},
{
"endpoint": "/api/v0/accounts",
"backend": "http://localhost:9181"
},
{
"endpoint": "/accounts.js",
"backend": "http://localhost:9181"
}
]
},
{
Expand Down
10 changes: 10 additions & 0 deletions pkg/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
},
},
{
Expand Down

0 comments on commit fae244d

Please sign in to comment.