手册:$wgCookieDomain
Appearance
| Cookies: $wgCookieDomain | |
|---|---|
| 为登录Cookie显式指定域。 |
|
| 引进版本: | 1.1.0前 |
| 移除版本: | 仍在使用 |
| 允许的值: | (字符串) |
| 默认值: | '' |
| 其他设置: 按首字母排序 | 按功能排序 | |
详情
在登录Cookie上显示设置域,例如thissubdomain.mydomain.org或用.mydomain.org表示所有子域。
默认情况下,此值未设置,此时PHP的setcookie函数会将Cookie的作用域设为当前域。
若您的网站可同时从www.example.com和example.com访问,则不应设置此值,因为此时在前者登录的用户在访问后者时会被注销。
You should bump the value of $wgAuthenticationTokenVersion upon changing this config, to avoid the old cookies scoped to the root domain or a subdomain affecting the login session of users. Otherwise, they may not be able to edit or even log out until the old cookies are cleared manually.