$remoteBasePath = (string)$options['remoteBasePath'];
}
- // Make sure the remote base path is a complete valid URL,
- // but possibly protocol-relative to avoid cache pollution
- $remoteBasePath = wfExpandUrl( $remoteBasePath, PROTO_RELATIVE );
-
return [ $localBasePath, $remoteBasePath ];
}
public function getScriptURLsForDebug( ResourceLoaderContext $context ) {
$urls = [];
foreach ( $this->getScriptFiles( $context ) as $file ) {
- $urls[] = $this->getRemotePath( $file );
+ $urls[] = OutputPage::transformResourcePath(
+ $this->getConfig(),
+ $this->getRemotePath( $file )
+ );
}
return $urls;
}
foreach ( $this->getStyleFiles( $context ) as $mediaType => $list ) {
$urls[$mediaType] = [];
foreach ( $list as $file ) {
- $urls[$mediaType][] = $this->getRemotePath( $file );
+ $urls[$mediaType][] = OutputPage::transformResourcePath(
+ $this->getConfig(),
+ $this->getRemotePath( $file )
+ );
}
}
return $urls;