import { CONFIG, EMBED_SIZE, OPENGRAPH_AND_OEMBED_COMMENT, STATIC_MAX_AGE, STATIC_PATHS } from '../initializers'
import { asyncMiddleware } from '../middlewares'
import { VideoModel } from '../models/video/video'
+import { VideoPrivacy } from '../../shared/models/videos'
const clientsRouter = express.Router()
const html = file.toString()
// Let Angular application handle errors
- if (!video) return res.sendFile(indexPath)
+ if (!video || video.privacy === VideoPrivacy.PRIVATE) return res.sendFile(indexPath)
const htmlStringPageWithTags = addOpenGraphAndOEmbedTags(html, video)
res.set('Content-Type', 'text/html; charset=UTF-8').send(htmlStringPageWithTags)