stop middleware converting favicon to string

closes #4658

- adds conditional to prevent favicon being processed as a string
This commit is contained in:
cobbspur 2014-12-16 20:22:31 +00:00
parent c030236933
commit 7d79016af5

View File

@ -215,7 +215,9 @@ function serveSharedFile(file, type, maxAge) {
if (err) {
return next(err);
}
buf = buf.toString().replace('{{blog-url}}', config.url.replace(/\/$/, ''));
if (type === 'text/xsl' || type === 'text/plain') {
buf = buf.toString().replace('{{blog-url}}', config.url.replace(/\/$/, ''));
}
content = {
headers: {
'Content-Type': type,