Development environment production environment cookie write domain name problem?

here"s the thing: the website does single sign-on and cookie is written under the primary domain name.
suppose
website 1: www.aaa.qwer.com , website 2: www.bbb.qwer.com ,

api interfaces are uniformly used api.qwer.com

< hr >

production environment cookie writes qwer.com , no problem, for the local development environment (domain name is localhost):

which domain name does cookie write when js is written?


js continues to write to qwer.com, just needs to be configured in the host file

127.0.0.1 test.qwer.com

then the local development environment accesses

through test.qwer.com
Menu