Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix koa middleware overwriting route of actual router #2095

Merged
merged 1 commit into from
Jun 1, 2022

Conversation

rochdev
Copy link
Member

@rochdev rochdev commented Jun 1, 2022

What does this PR do?

Fix koa middleware overwriting route of actual router.

Motivation

Middleware were setting the route in the order that next was called instead of the order in which they were entered, resulting in incorrect routes or paths in reverse order.

Fixes #2092

@rochdev rochdev added bug Something isn't working integrations semver-patch labels Jun 1, 2022
@rochdev rochdev requested a review from a team as a code owner June 1, 2022 01:17
@codecov
Copy link

codecov bot commented Jun 1, 2022

Codecov Report

Merging #2095 (d2177a4) into master (ca465ed) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #2095   +/-   ##
=======================================
  Coverage   92.83%   92.83%           
=======================================
  Files         207      207           
  Lines        8231     8233    +2     
=======================================
+ Hits         7641     7643    +2     
  Misses        590      590           
Impacted Files Coverage Δ
packages/datadog-instrumentations/src/koa.js 100.00% <100.00%> (ø)

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@rochdev rochdev merged commit 0abc42b into master Jun 1, 2022
@rochdev rochdev deleted the fix-koa-wrong-route-order branch June 1, 2022 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working integrations semver-patch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Koa: poluted http.route tag when using middlewares
2 participants