ultimate-express 2.0.4 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/router.js +4 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultimate-express",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
4
4
  "description": "The Ultimate Express. Fastest http server with full Express compatibility, based on uWebSockets.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/router.js CHANGED
@@ -543,6 +543,10 @@ module.exports = class Router extends EventEmitter {
543
543
  req._errorKey = route.routeKey;
544
544
  }
545
545
  if(routed) return resolve(true);
546
+ else if(req._isOptions && req._matchedMethods.size) {
547
+ // OPTIONS routing is different, it stops in the router if matched
548
+ return resolve(false);
549
+ }
546
550
  next();
547
551
  } else {
548
552
  // handle errors and error handlers