From 21f5955cb9d293f12d3436854e818636f65f5738 Mon Sep 17 00:00:00 2001
From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com>
Date: Tue, 23 Mar 2021 12:29:38 +0100
Subject: [PATCH] fix: add https to regex replace

---
 src/posts/posts.controller.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/posts/posts.controller.ts b/src/posts/posts.controller.ts
index 4db645243..54a41f690 100644
--- a/src/posts/posts.controller.ts
+++ b/src/posts/posts.controller.ts
@@ -57,7 +57,7 @@ export class PostsController {
               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}`);
+            post.html = post.html.replace(regex, `https://${this.configService.config.host}`);
           }
           return post;
         });
-- 
GitLab