aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-01-10 16:00:23 +0100
committerChocobozzz <me@florianbigard.com>2019-01-10 16:00:23 +0100
commitc04eb647db4f543a31a8100c1ec9a86c700bca6a (patch)
tree1c556ecf527dfd5dba4e5b5f636511ed33a8286b /server/lib
parent5abb9fbbd12e7097e348d6a38622d364b1fa47ed (diff)
downloadPeerTube-c04eb647db4f543a31a8100c1ec9a86c700bca6a.tar.gz
PeerTube-c04eb647db4f543a31a8100c1ec9a86c700bca6a.tar.zst
PeerTube-c04eb647db4f543a31a8100c1ec9a86c700bca6a.zip
Use origin video url in canonical tag
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/client-html.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/client-html.ts b/server/lib/client-html.ts
index 1875ec1fc..b2c376e20 100644
--- a/server/lib/client-html.ts
+++ b/server/lib/client-html.ts
@@ -1,7 +1,7 @@
1import * as express from 'express' 1import * as express from 'express'
2import * as Bluebird from 'bluebird' 2import * as Bluebird from 'bluebird'
3import { buildFileLocale, getDefaultLocale, is18nLocale, POSSIBLE_LOCALES } from '../../shared/models/i18n/i18n' 3import { buildFileLocale, getDefaultLocale, is18nLocale, POSSIBLE_LOCALES } from '../../shared/models/i18n/i18n'
4import { CONFIG, CUSTOM_HTML_TAG_COMMENTS, EMBED_SIZE, STATIC_PATHS } from '../initializers' 4import { CONFIG, CUSTOM_HTML_TAG_COMMENTS, EMBED_SIZE } from '../initializers'
5import { join } from 'path' 5import { join } from 'path'
6import { escapeHTML } from '../helpers/core-utils' 6import { escapeHTML } from '../helpers/core-utils'
7import { VideoModel } from '../models/video/video' 7import { VideoModel } from '../models/video/video'
@@ -187,8 +187,8 @@ export class ClientHtml {
187 // Schema.org 187 // Schema.org
188 tagsString += `<script type="application/ld+json">${JSON.stringify(schemaTags)}</script>` 188 tagsString += `<script type="application/ld+json">${JSON.stringify(schemaTags)}</script>`
189 189
190 // SEO 190 // SEO, use origin video url so Google does not index remote videos
191 tagsString += `<link rel="canonical" href="${videoUrl}" />` 191 tagsString += `<link rel="canonical" href="${video.url}" />`
192 192
193 return htmlStringPage.replace(CUSTOM_HTML_TAG_COMMENTS.OPENGRAPH_AND_OEMBED, tagsString) 193 return htmlStringPage.replace(CUSTOM_HTML_TAG_COMMENTS.OPENGRAPH_AND_OEMBED, tagsString)
194 } 194 }