Cookie not set in deployment but works in localhost

I’m not able to store the cookie when the site is deployed but it works fine when I’m using localhost.
When I’m deploying the site the cookie shows in the network tab but it is not stored.My backend is deployed on render and frontend on netlify.I’m sharing my github repo containing both the client and server please if someone can help in finding why the cookie is not stored when the site is deployed

Github repo-GitHub - aditya-1404/GomtiJewels

Hi :wave:t6: thanks so much for reaching out! Debugging custom code is outside the realm of support.

The Netlify Edge Functions API documentation provides some insights. The Context object exposes a cookies property, which is a simplified interface for reading and storing cookies. You can use cookies.get(name) to read a cookie with a given name from the incoming request, cookies.set(options) to set a cookie on the outgoing response, and cookies.delete(name) or cookies.delete(options) to delete a cookie.

However, setting cookies across subdomains only works for custom domains. If your site uses a netlify.app domain, it’s listed in the Mozilla Foundation’s Public Suffix List, which prevents setting cookies across subdomains. You can only set a cookie for all subdomains if your site uses a custom domain instead of yoursitename.netlify.app.

I hope this helps!