hydrator test

This commit is contained in:
Karol Wypchlo 2021-02-09 11:10:01 +01:00
parent 48cfd5142e
commit d3279b63a7
2 changed files with 11 additions and 2 deletions

View File

@ -1,7 +1,7 @@
- id: "ory:kratos:public" - id: "ory:kratos:public"
upstream: upstream:
preserve_host: true preserve_host: true
url: "http://kratos:4433" url: "http://accounts:3000/kratos"
strip_path: /.ory/kratos/public strip_path: /.ory/kratos/public
match: match:
url: "http://oathkeeper:4455/.ory/kratos/public/<**>" url: "http://oathkeeper:4455/.ory/kratos/public/<**>"
@ -16,7 +16,10 @@
authorizer: authorizer:
handler: allow handler: allow
mutators: mutators:
- handler: noop - handler: hydrator
config:
api:
url: "http://dashboard:3000/api/hydrator"
- id: "dashboard:anonymous" - id: "dashboard:anonymous"
upstream: upstream:

View File

@ -0,0 +1,6 @@
export default (req, res) => {
console.log(Object.keys(req));
console.log(JSON.stringify(req));
res.json({ name: "John Doe" });
};