mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
use cdn for blog
This commit is contained in:
parent
232a752328
commit
81744e4301
1 changed files with 2 additions and 0 deletions
|
@ -27,6 +27,8 @@ module.exports = BlogController =
|
||||||
data = data.trim()
|
data = data.trim()
|
||||||
try
|
try
|
||||||
data = JSON.parse(data)
|
data = JSON.parse(data)
|
||||||
|
if settings.cdn?.web?.host?
|
||||||
|
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
|
||||||
|
|
Loading…
Reference in a new issue