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 middleware order: Move Logger before Recoverer #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stavhaygn
Copy link

This PR addresses an issue with the order of middleware in the router setup. According to the chi documentation, the Logger middleware should be placed before any other middleware that may change the response, such as Recoverer middleware. In the current implementation, the Logger middleware is placed after the Recoverer middleware, which may result in incorrect logging behavior.

Changes made:

  • Moved the Logger middleware before the Recoverer middleware in the router setup.

By making this change, the middleware order will now be in compliance with chi's recommendations, ensuring proper logging behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant