Fix uri check

Check against req.originalUrl in case the middleware is mounted to an
endpoint.

Fixes #43