mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -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()
|
||||
try
|
||||
data = JSON.parse(data)
|
||||
if settings.cdn?.web?.host?
|
||||
data?.content = data?.content?.replace(/src="([^"]+)"/g, "src='#{settings.cdn?.web?.host}$1'");
|
||||
catch err
|
||||
logger.err err:err, data:data, "error parsing data from data"
|
||||
res.render "blog/blog_holder", data
|
||||
|
|
Loading…
Reference in a new issue