Coder Social home page Coder Social logo

wikimedia / mediawiki-extensions-hsts Goto Github PK

View Code? Open in Web Editor NEW
0.0 9.0 0.0 613 KB

Github mirror of MediaWiki extension HSTS - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing

PHP 91.26% JavaScript 8.74%

mediawiki-extensions-hsts's Introduction

The HSTS extension implements the HTTP Strict Transport Security feature (RFC 6797) as an opt-in (or opt-out) preference for each user, in order to be always redirected to the HTTPS version of the website, if the user agent (client browser) understands the HSTS functionality. The server administrator is also given the possibility to force the anonymous and/or logged-in users to have a STS header and thus stay on HTTPS.

== Configuration ==

These variables may be overridden in LocalSettings.php after you include the
extension file.

* <code>$wgHSTSBetaFeature</code>: (boolean; default=false) activate the HSTS preference as a [[Extension:BetaFeatures|Beta Feature]] or as a classical user preference;
* <code>$wgHSTSForAnons</code>: (boolean; default=false) whether to give the STS header to anonymous users;
* <code>$wgHSTSForUsers</code>: (boolean; default=false) whether to force the STS header for logged-in users; if true, the users do no more have their preference available since it became unuseful due to the server adminstrator’s decision.
* <code>$wgHSTSIncludeSubdomains</code>: (boolean; default=false) whether to include the "includeSubDomains" keyword in the STS header.
* <code>$wgHSTSMaxAge</code>: (integer or string; default=30*86400=30 days) max-age parameter for HSTS; can be either:
** an integer: (e.g. 3600) fixed number of seconds before expiration of HSTS (note that 0 will deactivate HSTS the next time the user visit the website), or
** a date: (e.g. "2014-09-24T00:00:00Z") when HSTS will expire (e.g. just before certificate expiration); MediaWiki must understand the date (see [[Manual:WfTimestamp#Formats|the manual]]).<br />Note that in this second case the header is dynamical, so you may want to configure accordingly your cache servers for a consistent user experience, particularly given the authoritative HSTS header is the last sent, even if shorter.

Additionally, you can set up:
* <code>$wgDefaultUserOptions['hsts']</code>: (0 or 1; default=0) default value of the preference for logged-in users (<code>0</code> = opt-out or <code>1</code> = opt-in)

== Links ==

* [https://www.mediawiki.org/wiki/Extension:HSTS Main page of the extension]
* [https://www.mediawiki.org/wiki/Extension:BetaFeatures Extension:BetaFeatures]

mediawiki-extensions-hsts's People

Contributors

dannys712 avatar hashar avatar kizule avatar ladsgroup avatar legoktm avatar paladox avatar plstand avatar raymondde avatar reedy avatar seb35 avatar siebrand avatar translatewiki avatar umherirrender avatar zabemath avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.