Skip to content

Commit

Permalink
Merge pull request #37 from thiagobustamante/master
Browse files Browse the repository at this point in the history
Expose req.user to request interceptors
  • Loading branch information
thiagobustamante committed Sep 29, 2017
2 parents 0617175 + 09a4b27 commit 3872c80
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tree-gateway",
"version": "1.1.4",
"version": "1.1.5",
"homepage": "http://treegateway.org",
"description": "The Tree Gateway API Gateway",
"author": "Thiago da Rosa de Bustamante <trbustamante@gmail.com>",
Expand Down
6 changes: 4 additions & 2 deletions src/proxy/interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ export class ProxyInterceptor {
body: req.body,
headers: Object.assign({}, req.headers),
method: req.method,
url: req.url
url: req.url,
user: req.user
};
Promise.resolve(interceptorMiddleware(proxyReq))
.then(result => {
Expand All @@ -76,7 +77,8 @@ export class ProxyInterceptor {
body: req.body,
headers: Object.assign({}, req.headers),
method: req.method,
url: req.url
url: req.url,
user: req.user
};
Promise.resolve(interceptorMiddleware(proxyReq))
.then(result => {
Expand Down

0 comments on commit 3872c80

Please sign in to comment.