diff options
author | Chocobozzz <me@florianbigard.com> | 2019-03-05 12:00:31 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-03-18 11:17:59 +0100 |
commit | 9c6ca37fc1512a99d420ea90707cebcd06cdc970 (patch) | |
tree | 2ef8e4c9bc30e911923a5b5c83f18e983553929d /server/controllers/static.ts | |
parent | 09979f8959425390b879bce22101a9bc061ae9a0 (diff) | |
download | PeerTube-9c6ca37fc1512a99d420ea90707cebcd06cdc970.tar.gz PeerTube-9c6ca37fc1512a99d420ea90707cebcd06cdc970.tar.zst PeerTube-9c6ca37fc1512a99d420ea90707cebcd06cdc970.zip |
Rename streaming playlists routes/directories
Diffstat (limited to 'server/controllers/static.ts')
-rw-r--r-- | server/controllers/static.ts | 13 |
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 @@ | |||
1 | import * as cors from 'cors' | 1 | import * as cors from 'cors' |
2 | import * as express from 'express' | 2 | import * as express from 'express' |
3 | import { CONFIG, HLS_PLAYLIST_DIRECTORY, ROUTE_CACHE_LIFETIME, STATIC_DOWNLOAD_PATHS, STATIC_MAX_AGE, STATIC_PATHS } from '../initializers' | 3 | import { |
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' | ||
4 | import { VideosPreviewCache } from '../lib/cache' | 11 | import { VideosPreviewCache } from '../lib/cache' |
5 | import { cacheRoute } from '../middlewares/cache' | 12 | import { cacheRoute } from '../middlewares/cache' |
6 | import { asyncMiddleware, videosGetValidator } from '../middlewares' | 13 | import { asyncMiddleware, videosGetValidator } from '../middlewares' |
@@ -53,9 +60,9 @@ staticRouter.use( | |||
53 | 60 | ||
54 | // HLS | 61 | // HLS |
55 | staticRouter.use( | 62 | staticRouter.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 |