Random Crashes when redirecting via middleware

On dev i will get regular crashes with the below error when redirecting via the middleware Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
2 Replies
TheKnightCoder
TheKnightCoderOP4mo ago
These crashes sometime happen and at other times do not also for me 90% of my issues has been with the middleware, anyone else has this issue? I'm thinking of stripping out all my middleware logic
Madaxen86
Madaxen864mo ago
Can you share your middleware code?

Did you find this page helpful?