Ability to add logic in Next.js middleware AFTER response from server #78279
Unanswered
jytheawesome
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Hi Next.js community,
I would like to ask if the following use case of Next.js middleware is possible:
Inside
middleware.ts
,Essentially, upon response from the route handler on the server, I want my middleware to log this response, before passing it back to the client.
From reading the documentation and some experimentation, it seems that the above is not supported by middleware in Next.js. Do correct me if I am wrong. Thanks!
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions