diff --git a/src/posts/posts.controller.ts b/src/posts/posts.controller.ts index dcc8ebf9fb0eb9a7b3f163f66d1418b6325d0d7d..4db645243384eac281c398768167d5cc7095c86f 100644 --- a/src/posts/posts.controller.ts +++ b/src/posts/posts.controller.ts @@ -56,6 +56,8 @@ export class PostsController { post.feature_image = `https://${this.configService.config.host}/blog/content${ post.feature_image.split('/content')[1] }`; + const regex = /(https?:\/\/ghost):(\d*)?/g; // (https?://ghost):(\d*)?/ + post.html = post.html.replace(regex, `${this.configService.config.host}`); } return post; });