This occurs after your data has been displayed and makes perfect sense as Expressive is unable to send headers as you’ve already started sending the body. To solve this, you need some middleware. It looks like this:
via Did you enjoy this article? Then read the full version from the author’s website.