aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/static.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/static.ts')
-rw-r--r--server/controllers/static.ts13
1 files changed, 10 insertions, 3 deletions
diff --git a/server/controllers/static.ts b/server/controllers/static.ts
index b21f9da00..639445b74 100644
--- a/server/controllers/static.ts
+++ b/server/controllers/static.ts
@@ -1,6 +1,13 @@
1import * as cors from 'cors' 1import * as cors from 'cors'
2import * as express from 'express' 2import * as express from 'express'
3import { CONFIG, HLS_PLAYLIST_DIRECTORY, ROUTE_CACHE_LIFETIME, STATIC_DOWNLOAD_PATHS, STATIC_MAX_AGE, STATIC_PATHS } from '../initializers' 3import {
4 CONFIG,
5 HLS_STREAMING_PLAYLIST_DIRECTORY,
6 ROUTE_CACHE_LIFETIME,
7 STATIC_DOWNLOAD_PATHS,
8 STATIC_MAX_AGE,
9 STATIC_PATHS
10} from '../initializers'
4import { VideosPreviewCache } from '../lib/cache' 11import { VideosPreviewCache } from '../lib/cache'
5import { cacheRoute } from '../middlewares/cache' 12import { cacheRoute } from '../middlewares/cache'
6import { asyncMiddleware, videosGetValidator } from '../middlewares' 13import { asyncMiddleware, videosGetValidator } from '../middlewares'
@@ -53,9 +60,9 @@ staticRouter.use(
53 60
54// HLS 61// HLS
55staticRouter.use( 62staticRouter.use(
56 STATIC_PATHS.PLAYLISTS.HLS, 63 STATIC_PATHS.STREAMING_PLAYLISTS.HLS,
57 cors(), 64 cors(),
58 express.static(HLS_PLAYLIST_DIRECTORY, { fallthrough: false }) // 404 if the file does not exist 65 express.static(HLS_STREAMING_PLAYLIST_DIRECTORY, { fallthrough: false }) // 404 if the file does not exist
59) 66)
60 67
61// Thumbnails path for express 68// Thumbnails path for express