Merge branch 'release/2.1.0' into develop

pull/2494/head
Chocobozzz 2020-02-20 10:43:33 +01:00
commit 4c1def5fd8
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 15 additions and 1 deletions

View File

@ -261,3 +261,11 @@ menu {
width: 100% !important;
}
}
@media (hover: none) and (pointer: coarse) {
.menu-wrapper {
menu {
overflow-y: auto;
}
}
}

View File

@ -2,10 +2,11 @@ import * as express from 'express'
import { join } from 'path'
import { root } from '../helpers/core-utils'
import { ACCEPT_HEADERS, STATIC_MAX_AGE } from '../initializers/constants'
import { asyncMiddleware } from '../middlewares'
import { asyncMiddleware, embedCSP } from '../middlewares'
import { buildFileLocale, getCompleteLocale, is18nLocale, LOCALE_FILES } from '../../shared/models/i18n/i18n'
import { ClientHtml } from '../lib/client-html'
import { logger } from '../helpers/logger'
import { CONFIG } from '@server/initializers/config'
const clientsRouter = express.Router()
@ -19,8 +20,13 @@ clientsRouter.use('/videos/watch/:id', asyncMiddleware(generateWatchHtmlPage))
clientsRouter.use('/accounts/:nameWithHost', asyncMiddleware(generateAccountHtmlPage))
clientsRouter.use('/video-channels/:nameWithHost', asyncMiddleware(generateVideoChannelHtmlPage))
const embedCSPMiddleware = CONFIG.CSP.ENABLED
? embedCSP
: (req: express.Request, res: express.Response, next: express.NextFunction) => next()
clientsRouter.use(
'/videos/embed',
embedCSPMiddleware,
(req: express.Request, res: express.Response) => {
res.removeHeader('X-Frame-Options')
res.sendFile(embedPath)