diff options
author | Chocobozzz <me@florianbigard.com> | 2021-03-23 17:18:18 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-03-24 18:18:41 +0100 |
commit | eebd9838f067369031af9770b899f75f30810549 (patch) | |
tree | b7ce9668e6a653a097b6790ac944eaa1d78d2032 /shared/models | |
parent | 4bc45da342597fb49593fc14c40f8dc5a97bb64e (diff) | |
download | PeerTube-eebd9838f067369031af9770b899f75f30810549.tar.gz PeerTube-eebd9838f067369031af9770b899f75f30810549.tar.zst PeerTube-eebd9838f067369031af9770b899f75f30810549.zip |
Add filter hook to forbid embed access
Diffstat (limited to 'shared/models')
-rw-r--r-- | shared/models/plugins/server-hook.model.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/shared/models/plugins/server-hook.model.ts b/shared/models/plugins/server-hook.model.ts index 1f7806d0d..d28f76dfe 100644 --- a/shared/models/plugins/server-hook.model.ts +++ b/shared/models/plugins/server-hook.model.ts | |||
@@ -54,7 +54,11 @@ export const serverFilterHookObject = { | |||
54 | 54 | ||
55 | // Filter result used to check if video/torrent download is allowed | 55 | // Filter result used to check if video/torrent download is allowed |
56 | 'filter:api.download.video.allowed.result': true, | 56 | 'filter:api.download.video.allowed.result': true, |
57 | 'filter:api.download.torrent.allowed.result': true | 57 | 'filter:api.download.torrent.allowed.result': true, |
58 | |||
59 | // Filter result to check if the embed is allowed for a particular request | ||
60 | 'filter:html.embed.video.allowed.result': true, | ||
61 | 'filter:html.embed.video-playlist.allowed.result': true | ||
58 | } | 62 | } |
59 | 63 | ||
60 | export type ServerFilterHookName = keyof typeof serverFilterHookObject | 64 | export type ServerFilterHookName = keyof typeof serverFilterHookObject |