diff options
author | Chocobozzz <me@florianbigard.com> | 2019-01-10 16:00:23 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-01-10 16:00:23 +0100 |
commit | c04eb647db4f543a31a8100c1ec9a86c700bca6a (patch) | |
tree | 1c556ecf527dfd5dba4e5b5f636511ed33a8286b /server/lib | |
parent | 5abb9fbbd12e7097e348d6a38622d364b1fa47ed (diff) | |
download | PeerTube-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.ts | 6 |
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 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import * as Bluebird from 'bluebird' | 2 | import * as Bluebird from 'bluebird' |
3 | import { buildFileLocale, getDefaultLocale, is18nLocale, POSSIBLE_LOCALES } from '../../shared/models/i18n/i18n' | 3 | import { buildFileLocale, getDefaultLocale, is18nLocale, POSSIBLE_LOCALES } from '../../shared/models/i18n/i18n' |
4 | import { CONFIG, CUSTOM_HTML_TAG_COMMENTS, EMBED_SIZE, STATIC_PATHS } from '../initializers' | 4 | import { CONFIG, CUSTOM_HTML_TAG_COMMENTS, EMBED_SIZE } from '../initializers' |
5 | import { join } from 'path' | 5 | import { join } from 'path' |
6 | import { escapeHTML } from '../helpers/core-utils' | 6 | import { escapeHTML } from '../helpers/core-utils' |
7 | import { VideoModel } from '../models/video/video' | 7 | import { 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 | } |