Merge "Add Vary: X-Forwarded-Proto for https redirects"
[lhc/web/wiklou.git] / includes / Wiki.php
index 32c51db..48e56ab 100644 (file)
@@ -546,6 +546,8 @@ class MediaWiki {
                        $title = Title::newFromText( NS_MAIN, 'REDIR' );
                        $this->context->setTitle( $title );
                        $output = $this->context->getOutput();
+                       // Since we only do this redir to change proto, always send a vary header
+                       $output->addVaryHeader( 'X-Forwarded-Proto' );
                        $output->redirect( $redirUrl );
                        $output->output();
                        wfProfileOut( __METHOD__ );