Skip to content

Commit

Permalink
document express middleware removal limitation (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmelis authored Oct 23, 2020
1 parent 6bddbb3 commit fbaedd6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ It includes some custom metrics:

In addition, it also contains the metrics exposed by the [express prometheus bundle](https://github.com/jochen-schweizer/express-prom-bundle). Note that the `/graphqlsha/<sha>` path has been normalized to avoid cardinality explosion.

## Limitations

- Removing SHAs from the router stack is currently being done using an unsafe mechanism: splicing the private parameter `app._router.stack` which is unsupported and may cause issues. This functionality may break if the Express version is upgraded. However, the testing suite should catch this specific regression. The right solution for this is to replace the entire router, instead of removing the middleware. This has been discussed in this issue: https://github.com/expressjs/express/issues/4436.

## Development Environment

### Setting up yarn
Expand Down

0 comments on commit fbaedd6

Please sign in to comment.