I'm using a node server with express and cookie-parser to send cookies to the client. The cookie looks something like this,
res.cookie(
COOKIE_NAME,
COOKIE_CONTENT, {
maxAge: 15 * 60 * 1000, // 15 minutes
secure: true,
httpOnly: true,
sameSite: true,
});
It's working fine when used in my local machine but doesn't seem to work when I'm doing the same from an ec2 instance over aws's public ipv4 address given to the ec2 instance. I'm wondering if I need a load balancer or a nginx proxy or some additional configuration?
Note: CORS is also set with proper origin, preflightContinue and credentials are enabled. All routes are accessible from client. The client is also hosted in the same ec2 instance with different port.