ResourceLoader: Serve stylesheets with "Access-Control-Allow-Origin: *"
authorDerk-Jan Hartman <hartman@videolan.org>
Sun, 21 Apr 2013 14:38:23 +0000 (16:38 +0200)
committerGerrit Code Review <gerrit@wikimedia.org>
Sun, 16 Jun 2013 18:47:47 +0000 (18:47 +0000)
This allows Javascript to access our styling information (cssRules and
related cross domain protected dom information) even if it is hosted
on a different domain.

Bug: 25886
Change-Id: I8e05c13ae1a1589fd120d5c439b1a7128ce2b659

includes/resourceloader/ResourceLoader.php

index 543bd1d..d2ddea3 100644 (file)
@@ -563,6 +563,7 @@ class ResourceLoader {
                }
                if ( $context->getOnly() === 'styles' ) {
                        header( 'Content-Type: text/css; charset=utf-8' );
+                       header( 'Access-Control-Allow-Origin: *' );
                } else {
                        header( 'Content-Type: text/javascript; charset=utf-8' );
                }