diff options
author | kontrollanten <6680299+kontrollanten@users.noreply.github.com> | 2022-10-04 10:53:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-04 10:53:00 +0200 |
commit | 6c5f0d3aebbd9debcd33a9aab306b130547852a5 (patch) | |
tree | bb5da168dc1d60f13c3fd6247fa9082928529a8a /server/initializers | |
parent | cfd57d2ca0bb058087f7dc90fcc3e8442b0288e1 (diff) | |
download | PeerTube-6c5f0d3aebbd9debcd33a9aab306b130547852a5.tar.gz PeerTube-6c5f0d3aebbd9debcd33a9aab306b130547852a5.tar.zst PeerTube-6c5f0d3aebbd9debcd33a9aab306b130547852a5.zip |
server: serve files from storage/well-known (#5214)
* server: serve files from storage/well-known
closes #5206
* well-known: add tests
* test: try to skip new tests
* test: another try
* fix(config/prod): well_known path
* test: fix broken tests
* Update misc-endpoints.ts
* Use getDirectoryPath for tests
* Fix tests
Co-authored-by: Chocobozzz <me@florianbigard.com>
Diffstat (limited to 'server/initializers')
-rw-r--r-- | server/initializers/checker-before-init.ts | 2 | ||||
-rw-r--r-- | server/initializers/config.ts | 3 | ||||
-rw-r--r-- | server/initializers/constants.ts | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.ts index 3188903be..1fd4ba248 100644 --- a/server/initializers/checker-before-init.ts +++ b/server/initializers/checker-before-init.ts | |||
@@ -16,7 +16,7 @@ function checkMissedConfig () { | |||
16 | 'smtp.hostname', 'smtp.port', 'smtp.username', 'smtp.password', 'smtp.tls', 'smtp.from_address', | 16 | 'smtp.hostname', 'smtp.port', 'smtp.username', 'smtp.password', 'smtp.tls', 'smtp.from_address', |
17 | 'email.body.signature', 'email.subject.prefix', | 17 | 'email.body.signature', 'email.subject.prefix', |
18 | 'storage.avatars', 'storage.videos', 'storage.logs', 'storage.previews', 'storage.thumbnails', 'storage.torrents', 'storage.cache', | 18 | 'storage.avatars', 'storage.videos', 'storage.logs', 'storage.previews', 'storage.thumbnails', 'storage.torrents', 'storage.cache', |
19 | 'storage.redundancy', 'storage.tmp', 'storage.streaming_playlists', 'storage.plugins', | 19 | 'storage.redundancy', 'storage.tmp', 'storage.streaming_playlists', 'storage.plugins', 'storage.well_known', |
20 | 'log.level', | 20 | 'log.level', |
21 | 'user.video_quota', 'user.video_quota_daily', | 21 | 'user.video_quota', 'user.video_quota_daily', |
22 | 'video_channels.max_per_user', | 22 | 'video_channels.max_per_user', |
diff --git a/server/initializers/config.ts b/server/initializers/config.ts index 2c92bea22..287bf6f6d 100644 --- a/server/initializers/config.ts +++ b/server/initializers/config.ts | |||
@@ -107,7 +107,8 @@ const CONFIG = { | |||
107 | TORRENTS_DIR: buildPath(config.get<string>('storage.torrents')), | 107 | TORRENTS_DIR: buildPath(config.get<string>('storage.torrents')), |
108 | CACHE_DIR: buildPath(config.get<string>('storage.cache')), | 108 | CACHE_DIR: buildPath(config.get<string>('storage.cache')), |
109 | PLUGINS_DIR: buildPath(config.get<string>('storage.plugins')), | 109 | PLUGINS_DIR: buildPath(config.get<string>('storage.plugins')), |
110 | CLIENT_OVERRIDES_DIR: buildPath(config.get<string>('storage.client_overrides')) | 110 | CLIENT_OVERRIDES_DIR: buildPath(config.get<string>('storage.client_overrides')), |
111 | WELL_KNOWN_DIR: buildPath(config.get<string>('storage.well_known')) | ||
111 | }, | 112 | }, |
112 | OBJECT_STORAGE: { | 113 | OBJECT_STORAGE: { |
113 | ENABLED: config.get<boolean>('object_storage.enabled'), | 114 | ENABLED: config.get<boolean>('object_storage.enabled'), |
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 7039ab457..9257ebf93 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -116,7 +116,8 @@ const ROUTE_CACHE_LIFETIME = { | |||
116 | ACTIVITY_PUB: { | 116 | ACTIVITY_PUB: { |
117 | VIDEOS: '1 second' // 1 second, cache concurrent requests after a broadcast for example | 117 | VIDEOS: '1 second' // 1 second, cache concurrent requests after a broadcast for example |
118 | }, | 118 | }, |
119 | STATS: '4 hours' | 119 | STATS: '4 hours', |
120 | WELL_KNOWN: '1 day' | ||
120 | } | 121 | } |
121 | 122 | ||
122 | // --------------------------------------------------------------------------- | 123 | // --------------------------------------------------------------------------- |