aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-12-16 09:38:27 +0100
committerChocobozzz <me@florianbigard.com>2021-12-16 10:08:55 +0100
commitb65de1be4dcf626c552be613d531d3f6e23c6085 (patch)
tree42c4d7440f9fadee6efb48ad39ccfe1a3bce8511 /server/lib
parent9576506763c20c7efbdb229483440a1fc984cf4d (diff)
downloadPeerTube-b65de1be4dcf626c552be613d531d3f6e23c6085.tar.gz
PeerTube-b65de1be4dcf626c552be613d531d3f6e23c6085.tar.zst
PeerTube-b65de1be4dcf626c552be613d531d3f6e23c6085.zip
Use different p2p policy for embeds and webapp
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/auth/oauth-model.ts2
-rw-r--r--server/lib/server-config-manager.ts7
2 files changed, 7 insertions, 2 deletions
diff --git a/server/lib/auth/oauth-model.ts b/server/lib/auth/oauth-model.ts
index 754bee36d..b68cce6d2 100644
--- a/server/lib/auth/oauth-model.ts
+++ b/server/lib/auth/oauth-model.ts
@@ -226,7 +226,7 @@ async function createUserFromExternal (pluginAuth: string, options: {
226 password: null, 226 password: null,
227 email: options.email, 227 email: options.email,
228 nsfwPolicy: CONFIG.INSTANCE.DEFAULT_NSFW_POLICY, 228 nsfwPolicy: CONFIG.INSTANCE.DEFAULT_NSFW_POLICY,
229 p2pEnabled: CONFIG.DEFAULTS.P2P.ENABLED, 229 p2pEnabled: CONFIG.DEFAULTS.P2P.WEBAPP.ENABLED,
230 autoPlayVideo: true, 230 autoPlayVideo: true,
231 role: options.role, 231 role: options.role,
232 videoQuota: CONFIG.USER.VIDEO_QUOTA, 232 videoQuota: CONFIG.USER.VIDEO_QUOTA,
diff --git a/server/lib/server-config-manager.ts b/server/lib/server-config-manager.ts
index d759f85e1..18032ef86 100644
--- a/server/lib/server-config-manager.ts
+++ b/server/lib/server-config-manager.ts
@@ -63,7 +63,12 @@ class ServerConfigManager {
63 licence: CONFIG.DEFAULTS.PUBLISH.LICENCE 63 licence: CONFIG.DEFAULTS.PUBLISH.LICENCE
64 }, 64 },
65 p2p: { 65 p2p: {
66 enabled: CONFIG.DEFAULTS.P2P.ENABLED 66 webapp: {
67 enabled: CONFIG.DEFAULTS.P2P.WEBAPP.ENABLED
68 },
69 embed: {
70 enabled: CONFIG.DEFAULTS.P2P.EMBED.ENABLED
71 }
67 } 72 }
68 }, 73 },
69 74