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

Redirect: do not call next after res.end() #25

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

Conversation

UltCombo
Copy link

@UltCombo UltCombo commented Feb 5, 2018

Express applications may have final handlers (e.g. to serve 404 pages or log errors), calling next after res.end will cause these handlers to be triggered when they should not.

If the application has a default page handler (common in SPAs with client-side routing) or 404 page, calling next after res.end will throw a "headers already sent" error.

Express applications may have final handlers (e.g. to serve 404 pages or log errors), calling `next` after `res.end` will cause these handlers to be triggered when they should not.

If the application has a default page handler (common in SPAs with client-side routing) or 404 page, calling `next` after `res.end` will throw a "headers already sent" error.
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.

1 participant