MyGithub Url - GitHub - sarb001/Assest-Social-Media-App ( second branch )
i have deployed both frontend/backend - render.com
set the cookie properly in domain - / credentials added
everything properly figured
but got cookies only in login side with warning tag
not after that got 401 error not getting cookies ( error is object null prototype : {} ) .
how to solve this error ???
Hi,
I suspect you’re using the default onrender.com
domain for both services, which is a domain on the Public Suffix list. Browsers use this list to restrict cookies on certain domains, like those provided by Render and other hosting platforms. This prevents being able to set cookies at a higher level, e.g., domain=onrender.com
, and so prevent other Render users from potentially being able to read each other’s cookies.
You’ll either need to use a custom domain on your services, so they’re not restricted by the public suffix list. Or if your frontend is a Static Site you could use the Redirects and Rewrites feature to rewrite a frontend path to the backend/API, so they would appear on the same subdomain.
Alan
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.