Skip to content

Commit

Permalink
Filters must run before body parsing. Interecptors should be used if …
Browse files Browse the repository at this point in the history
…needed after body parsing
  • Loading branch information
thiagobustamante committed Jun 21, 2017
1 parent 5b1cc86 commit 302280f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/proxy/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ export class ApiProxy {
* Configure a proxy for a given API
*/
proxy(apiRouter: express.Router, api: ApiConfig) {
this.filter.buildFilters(apiRouter, api);
if (api.proxy.parseReqBody) {
apiRouter.use(this.configureBodyParser(api));
}
this.filter.buildFilters(apiRouter, api);
apiRouter.use(this.configureProxy(api));
}

Expand Down

0 comments on commit 302280f

Please sign in to comment.