In my web application, I want to set the Secure flag to ensure that cookies are only transmitted over HTTPS. How do I configure cookies with the Secure flag, and are there other flags that improve cookie security, such as HttpOnly and SameSite?
Clear steps to set secure cookies, particularly in Node.js or other server environments, would be appreciated.