Use origin video url in canonical tag

pull/1551/head
Chocobozzz 2019-01-10 16:00:23 +01:00
parent 5abb9fbbd1
commit c04eb647db
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
import * as express from 'express' import * as express from 'express'
import * as Bluebird from 'bluebird' import * as Bluebird from 'bluebird'
import { buildFileLocale, getDefaultLocale, is18nLocale, POSSIBLE_LOCALES } from '../../shared/models/i18n/i18n' import { buildFileLocale, getDefaultLocale, is18nLocale, POSSIBLE_LOCALES } from '../../shared/models/i18n/i18n'
import { CONFIG, CUSTOM_HTML_TAG_COMMENTS, EMBED_SIZE, STATIC_PATHS } from '../initializers' import { CONFIG, CUSTOM_HTML_TAG_COMMENTS, EMBED_SIZE } from '../initializers'
import { join } from 'path' import { join } from 'path'
import { escapeHTML } from '../helpers/core-utils' import { escapeHTML } from '../helpers/core-utils'
import { VideoModel } from '../models/video/video' import { VideoModel } from '../models/video/video'
@ -187,8 +187,8 @@ export class ClientHtml {
// Schema.org // Schema.org
tagsString += `<script type="application/ld+json">${JSON.stringify(schemaTags)}</script>` tagsString += `<script type="application/ld+json">${JSON.stringify(schemaTags)}</script>`
// SEO // SEO, use origin video url so Google does not index remote videos
tagsString += `<link rel="canonical" href="${videoUrl}" />` tagsString += `<link rel="canonical" href="${video.url}" />`
return htmlStringPage.replace(CUSTOM_HTML_TAG_COMMENTS.OPENGRAPH_AND_OEMBED, tagsString) return htmlStringPage.replace(CUSTOM_HTML_TAG_COMMENTS.OPENGRAPH_AND_OEMBED, tagsString)
} }