由子域设置的Cookie在该域和所有其他子域上都可用,这是正常的吗? 我在NodeJS中有以下代码。
res.cookie('Authorization', token, {
expires: new Date(new Date().setMonth(new Date().getMonth() + 1)),
httpOnly: true,
signed: true,
sameSite: true,
});
cookie是从subdomain.domain.com设置的,并且仅在此子域上的开发人员工具中可见。 Cookie在主域或其他子域的开发人员工具中不可见,但后端仍可以访问它。
问题是,鉴于未使用以下属性设置cookie,这是否是预期的行为:
domain: .domain.com