diff options
author | Chocobozzz <me@florianbigard.com> | 2022-10-26 16:23:39 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-10-27 09:13:10 +0200 |
commit | 5a122dddc5aab1b2ae1843411032d5f392bdd216 (patch) | |
tree | 39778c4372c4b371f1294c94bf22d8a6e7a26456 /server/models/video/video-file.ts | |
parent | 49e7e4d9ffd16cba7a721f6d3d3203decf4f4b2c (diff) | |
download | PeerTube-5a122dddc5aab1b2ae1843411032d5f392bdd216.tar.gz PeerTube-5a122dddc5aab1b2ae1843411032d5f392bdd216.tar.zst PeerTube-5a122dddc5aab1b2ae1843411032d5f392bdd216.zip |
Option to disable static files auth check/s3 proxy
Diffstat (limited to 'server/models/video/video-file.ts')
-rw-r--r-- | server/models/video/video-file.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/models/video/video-file.ts b/server/models/video/video-file.ts index c20c90c1b..9c4e6d078 100644 --- a/server/models/video/video-file.ts +++ b/server/models/video/video-file.ts | |||
@@ -54,6 +54,7 @@ import { doesExist } from '../shared' | |||
54 | import { parseAggregateResult, throwIfNotValid } from '../utils' | 54 | import { parseAggregateResult, throwIfNotValid } from '../utils' |
55 | import { VideoModel } from './video' | 55 | import { VideoModel } from './video' |
56 | import { VideoStreamingPlaylistModel } from './video-streaming-playlist' | 56 | import { VideoStreamingPlaylistModel } from './video-streaming-playlist' |
57 | import { CONFIG } from '@server/initializers/config' | ||
57 | 58 | ||
58 | export enum ScopeNames { | 59 | export enum ScopeNames { |
59 | WITH_VIDEO = 'WITH_VIDEO', | 60 | WITH_VIDEO = 'WITH_VIDEO', |
@@ -511,7 +512,7 @@ export class VideoFileModel extends Model<Partial<AttributesOnly<VideoFileModel> | |||
511 | // --------------------------------------------------------------------------- | 512 | // --------------------------------------------------------------------------- |
512 | 513 | ||
513 | getObjectStorageUrl (video: MVideo) { | 514 | getObjectStorageUrl (video: MVideo) { |
514 | if (video.hasPrivateStaticPath()) { | 515 | if (video.hasPrivateStaticPath() && CONFIG.OBJECT_STORAGE.PROXY.PROXIFY_PRIVATE_FILES === true) { |
515 | return this.getPrivateObjectStorageUrl(video) | 516 | return this.getPrivateObjectStorageUrl(video) |
516 | } | 517 | } |
517 | 518 | ||