Render.com overwriting cookies domain

Hey there! I am building an application in NestJS and it sets the cookies from my frontend. The function that does it is this one:

res.cookie(key, value, {
httpOnly: true,
maxAge: maxAge * 1000,
path: ‘/’,
domain: mycustomdomain.com,
secure: true,
sameSite: ‘none’,
});

the problem is:

when i call the api, it sets the cookies correctly, but not its domain. Instead of my custom domain, it is being set to the backend domain (backenddomain.onrender.com) and the cookies disappears, because the difference of the domains. Is that a platform problem? I did search everywhere and i found nothing about my code, but i dont know if it is possible to fix it if it is a platform problem.

Hi there,

This would be an issue in your code, Render does not set or modify your cookies.

Regards,
Keith
Render Support, UTC+10 :australia:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.