don't use cdn for blog posts which have a http on them

This commit is contained in:
Henry Oswald 2016-09-20 14:47:33 +01:00
parent 89d1a9a51c
commit d4863ae148

View file

@ -28,7 +28,7 @@ module.exports = BlogController =
try try
data = JSON.parse(data) data = JSON.parse(data)
if settings.cdn?.web?.host? if settings.cdn?.web?.host?
data?.content = data?.content?.replace(/src="([^"]+)"/g, "src='#{settings.cdn?.web?.host}$1'"); data?.content = data?.content?.replace(/src="([^"\:]+)"/g, "src='#{settings.cdn?.web?.host}$1'");
catch err catch err
logger.err err:err, data:data, "error parsing data from data" logger.err err:err, data:data, "error parsing data from data"
res.render "blog/blog_holder", data res.render "blog/blog_holder", data