手册:$wgSecureLogin
Jump to navigation
Jump to search
特殊页面: $wgSecureLogin | |
---|---|
是否允许用户在来自http的时候使用https进行身份验证。 |
|
引进版本: | 1.17.0 (r75585) |
移除版本: | 仍在使用 |
允许的值: | (布尔值) |
默认值: | false |
其他设置: 按首字母排序 | 按功能排序 |
细节
如果为真,强制用户若来自http在认证时使用https,但仅在$wgServer
中使用协议相对URL有效(否则该设置将被忽略)。
Note also that under certain circumstances, when serving http and https in parallel on a web server, specifying http within a browser's location and adding the fromhttp=1
query parameter, the login page will be downgraded from https to http, even when $wgSecureLogin
is set to true.
A link will then display above the username field allowing a user to choose the secure login option.
从1.22版本开始,如果您希望HTTP用户在登录后保持HTTP状态,使用$wgDefaultUserOptions
将prefershttps
的默认值设置为false。
基于George Herbert在wikitech-l上的想法(mailarchive:wikitech-l/2010-October/050071.html)。
您需要将$wgServer按照如下设置。
MediaWiki版本: | ≥ 1.17 |
$wgServer = "//replacethisexample.com";
$wgSecureLogin = true;