universal-starter icon indicating copy to clipboard operation
universal-starter copied to clipboard

Error: Can't set headers after they are sent to the client

Open Code0987 opened this issue 4 years ago • 0 comments

https://github.com/Angular-RU/angular-universal-starter/blob/d0b4b2a05a9d32c52562cf364261669bffde873c/server.ts#L61

The above code can cause express error Error: Can't set headers after they are sent to the client in some cases.

I think next() was still called even after res.redirect calls happened, not sure if it is intended.

Code0987 avatar Apr 21 '20 17:04 Code0987