手册:$wgSecureLogin

This page is a translated version of the page Manual:$wgSecureLogin and the translation is 100% complete.
认证: $wgSecureLogin
是否允许用户在来自http的时候使用https进行身份验证。
引进版本:1.17.0 (r75585)
移除版本:仍在使用
允许的值:(布尔值)
默认值:false

细节

如果为真,强制用户若来自http在认证时使用https,但仅在$wgServer 中使用协议相对URL有效(否则该设置将被忽略)。 还要注意,在某些情况下,当在web服务器上并行提供http和https服务时,在浏览器的位置中指定http并添加fromhttp=1查询参数,登录页面将从https降级为http,即使$wgSecureLogin设置为true。 用户名字段上方会显示一个链接,允许用户选择安全登录选项。

从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;

另请参阅