'res.cookie wouldn't set on my server-side app which deployed on Heroku

I have actually 2 apps one of react app and the other is the express app. When I try to send a request from my local React app to my express app which is on the server, it doesn't set a cookie for a response. Can anyone help me? here is my set up on server.js

here is I just try to set cookie

here is my front end request

request on the browser

it doesn't seem in here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source