Skip to content

Commit

Permalink
Minor improvements in rewrite config
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeche committed Mar 19, 2015
1 parent 8f7769a commit 554b44f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion processor/rewrite-url.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ var defaultConfig = {
* for example, it is possible to add cache-busting tokens
*/
staticMap: {
img: ['src'],
script: ['src'],
link: ['href'],
video: ['src'],
Expand All @@ -104,6 +105,10 @@ function createConfig(config) {
if (config && config.rewriteMapAddon) {
out.rewriteMap = extend({}, defaultConfig.rewriteMap, config.rewriteMapAddon);
}

if (config && config.staticMapAddon) {
out.staticMap = extend({}, defaultConfig.staticMap, config.staticMapAddon);
}

return out;
}
Expand Down Expand Up @@ -252,4 +257,4 @@ module.exports = function(config) {

module.exports.config = defaultConfig;
module.exports.absoluteUrl = absoluteUrl;
module.exports.rebuildUrl = rebuildUrl;
module.exports.rebuildUrl = rebuildUrl;

0 comments on commit 554b44f

Please sign in to comment.