From: Chocobozzz Date: Fri, 18 Nov 2016 17:55:34 +0000 (+0100) Subject: Fix opengraph url tag X-Git-Tag: v0.0.1-alpha~609 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=40e3f5e1c5203266d9fb078076c8c4dc61b24be8;p=github%2FChocobozzz%2FPeerTube.git Fix opengraph url tag --- diff --git a/server/controllers/client.js b/server/controllers/client.js index e3251d7e9..61e094980 100644 --- a/server/controllers/client.js +++ b/server/controllers/client.js @@ -31,19 +31,19 @@ module.exports = router // --------------------------------------------------------------------------- function addOpenGraphTags (htmlStringPage, video) { - const videoUrl = constants.CONFIG.WEBSERVER.URL + '/videos/watch/' - let baseUrlHttp + let basePreviewUrlHttp if (video.isOwned()) { - baseUrlHttp = constants.CONFIG.WEBSERVER.URL + basePreviewUrlHttp = constants.CONFIG.WEBSERVER.URL } else { - baseUrlHttp = constants.REMOTE_SCHEME.HTTP + '://' + video.podHost + basePreviewUrlHttp = constants.REMOTE_SCHEME.HTTP + '://' + video.podHost } // We fetch the remote preview (bigger than the thumbnail) // This should not overhead the remote server since social websites put in a cache the OpenGraph tags // We can't use the thumbnail because these social websites want bigger images (> 200x200 for Facebook for example) - const previewUrl = baseUrlHttp + constants.STATIC_PATHS.PREVIEWS + video.getPreviewName() + const previewUrl = basePreviewUrlHttp + constants.STATIC_PATHS.PREVIEWS + video.getPreviewName() + const videoUrl = constants.CONFIG.WEBSERVER.URL + '/videos/watch/' + video._id const metaTags = { 'og:type': 'video',