aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--client/src/app/menu/menu.component.scss8
-rw-r--r--server/controllers/client.ts8
2 files changed, 15 insertions, 1 deletions
diff --git a/client/src/app/menu/menu.component.scss b/client/src/app/menu/menu.component.scss
index cb5f90723..dec045928 100644
--- a/client/src/app/menu/menu.component.scss
+++ b/client/src/app/menu/menu.component.scss
@@ -261,3 +261,11 @@ menu {
261 width: 100% !important; 261 width: 100% !important;
262 } 262 }
263} 263}
264
265@media (hover: none) and (pointer: coarse) {
266 .menu-wrapper {
267 menu {
268 overflow-y: auto;
269 }
270 }
271}
diff --git a/server/controllers/client.ts b/server/controllers/client.ts
index e4643e171..20689fb58 100644
--- a/server/controllers/client.ts
+++ b/server/controllers/client.ts
@@ -2,10 +2,11 @@ import * as express from 'express'
2import { join } from 'path' 2import { join } from 'path'
3import { root } from '../helpers/core-utils' 3import { root } from '../helpers/core-utils'
4import { ACCEPT_HEADERS, STATIC_MAX_AGE } from '../initializers/constants' 4import { ACCEPT_HEADERS, STATIC_MAX_AGE } from '../initializers/constants'
5import { asyncMiddleware } from '../middlewares' 5import { asyncMiddleware, embedCSP } from '../middlewares'
6import { buildFileLocale, getCompleteLocale, is18nLocale, LOCALE_FILES } from '../../shared/models/i18n/i18n' 6import { buildFileLocale, getCompleteLocale, is18nLocale, LOCALE_FILES } from '../../shared/models/i18n/i18n'
7import { ClientHtml } from '../lib/client-html' 7import { ClientHtml } from '../lib/client-html'
8import { logger } from '../helpers/logger' 8import { logger } from '../helpers/logger'
9import { CONFIG } from '@server/initializers/config'
9 10
10const clientsRouter = express.Router() 11const clientsRouter = express.Router()
11 12
@@ -19,8 +20,13 @@ clientsRouter.use('/videos/watch/:id', asyncMiddleware(generateWatchHtmlPage))
19clientsRouter.use('/accounts/:nameWithHost', asyncMiddleware(generateAccountHtmlPage)) 20clientsRouter.use('/accounts/:nameWithHost', asyncMiddleware(generateAccountHtmlPage))
20clientsRouter.use('/video-channels/:nameWithHost', asyncMiddleware(generateVideoChannelHtmlPage)) 21clientsRouter.use('/video-channels/:nameWithHost', asyncMiddleware(generateVideoChannelHtmlPage))
21 22
23const embedCSPMiddleware = CONFIG.CSP.ENABLED
24 ? embedCSP
25 : (req: express.Request, res: express.Response, next: express.NextFunction) => next()
26
22clientsRouter.use( 27clientsRouter.use(
23 '/videos/embed', 28 '/videos/embed',
29 embedCSPMiddleware,
24 (req: express.Request, res: express.Response) => { 30 (req: express.Request, res: express.Response) => {
25 res.removeHeader('X-Frame-Options') 31 res.removeHeader('X-Frame-Options')
26 res.sendFile(embedPath) 32 res.sendFile(embedPath)