diff --git a/client/public/index.html b/client/public/index.html index fecad1f..cdcdbb7 100644 --- a/client/public/index.html +++ b/client/public/index.html @@ -27,9 +27,10 @@ Corgi Corner - + + - + diff --git a/server/src/client/endpoints/Home.js b/server/src/client/endpoints/Home.js index 053d4f2..738ad7a 100644 --- a/server/src/client/endpoints/Home.js +++ b/server/src/client/endpoints/Home.js @@ -37,12 +37,12 @@ class Home extends Endpoint { async get(req, res) { console.log('\n\n\nPATH', req.path, '\n\n\n'); - const { path, protocol } = req; + const { path } = req; if ((/\/media\/.+/u).test(path)) { const title = decodeURI(path.replace('/media/', '')); const clip = this.client.clipIndex.getByTitle(title); - const baseUrl = `${protocol}://${this.client.domain}`; + const baseUrl = `https://${this.client.domain}`; const clientUrl = `${baseUrl}${path}`; const thumbnailUrl = `${baseUrl}/thumbnails/${clip.thumbnail}`; const clipUrl = `${baseUrl}/clips/${clip.filename}`; @@ -50,10 +50,10 @@ class Home extends Endpoint { console.log(this.index); const html = this.index. // replace(`Corgi Corner`, clip.name). - replace(`{{META_author}}`, clip.uploader.tag). - replace(`{{META_url}}`, clientUrl). - replace(`{{META_thumbnail}}`, thumbnailUrl). - replace(`{{META_srcUrl}}`, clipUrl); + replace(/{{META_author}}/ug, clip.uploader.tag). + replace(/{{META_url}}/ug, clientUrl). + replace(/{{META_thumbnail}}/ug, thumbnailUrl). + replace(/{{META_srcUrl}}/ug, clipUrl); console.log(html); return res.send(html); }