*/
$wgEnableBlockNoticeStats = false;
+/**
+ * Origin Trials tokens.
+ *
+ * @since 1.34
+ * @var array
+ */
+$wgOriginTrials = [];
+
/**
* For really cool vim folding this needs to be at the end:
* vim: foldmarker=@{,@} foldmethod=marker
return false;
}
+ /**
+ * Get the Origin-Trial header values. This is used to enable Chrome Origin
+ * Trials: https://github.com/GoogleChrome/OriginTrials
+ *
+ * @return array
+ */
+ private function getOriginTrials() {
+ $config = $this->getConfig();
+
+ return $config->get( 'OriginTrials' );
+ }
+
/**
* Send cache control HTTP headers
*/
$response->header( "X-Frame-Options: $frameOptions" );
}
+ $originTrials = $this->getOriginTrials();
+ foreach ( $originTrials as $originTrial ) {
+ $response->header( "Origin-Trial: $originTrial", false );
+ }
+
ContentSecurityPolicy::sendHeaders( $this );
if ( $this->mArticleBodyOnly ) {