aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/constants.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r--server/initializers/constants.ts17
1 files changed, 16 insertions, 1 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 9a262fd4b..e730e3c84 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -1,4 +1,5 @@
1import { join } from 'path' 1import { join } from 'path'
2import { randomBytes } from 'crypto'
2import { JobType, VideoRateType, VideoResolution, VideoState } from '../../shared/models' 3import { JobType, VideoRateType, VideoResolution, VideoState } from '../../shared/models'
3import { ActivityPubActorType } from '../../shared/models/activitypub' 4import { ActivityPubActorType } from '../../shared/models/activitypub'
4import { FollowState } from '../../shared/models/actors' 5import { FollowState } from '../../shared/models/actors'
@@ -710,6 +711,14 @@ registerConfigChangedHandler(() => {
710 711
711// --------------------------------------------------------------------------- 712// ---------------------------------------------------------------------------
712 713
714const FILES_CONTENT_HASH = {
715 MANIFEST: generateContentHash(),
716 FAVICON: generateContentHash(),
717 LOGO: generateContentHash()
718}
719
720// ---------------------------------------------------------------------------
721
713export { 722export {
714 WEBSERVER, 723 WEBSERVER,
715 API_VERSION, 724 API_VERSION,
@@ -792,8 +801,10 @@ export {
792 VIDEO_PLAYLIST_PRIVACIES, 801 VIDEO_PLAYLIST_PRIVACIES,
793 PLUGIN_EXTERNAL_AUTH_TOKEN_LIFETIME, 802 PLUGIN_EXTERNAL_AUTH_TOKEN_LIFETIME,
794 ASSETS_PATH, 803 ASSETS_PATH,
804 FILES_CONTENT_HASH,
795 loadLanguages, 805 loadLanguages,
796 buildLanguages 806 buildLanguages,
807 generateContentHash
797} 808}
798 809
799// --------------------------------------------------------------------------- 810// ---------------------------------------------------------------------------
@@ -895,3 +906,7 @@ function buildLanguages () {
895 906
896 return languages 907 return languages
897} 908}
909
910function generateContentHash () {
911 return randomBytes(20).toString('hex')
912}