wikimedia / mediawiki-extensions-hsts Goto Github PK
View Code? Open in Web Editor NEWGithub mirror of MediaWiki extension HSTS - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing
Github mirror of MediaWiki extension HSTS - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing
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]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.