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 /server/controllers/download.ts | |
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 'server/controllers/download.ts')
-rw-r--r-- | server/controllers/download.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/controllers/download.ts b/server/controllers/download.ts index fd44f10e9..9a8194c5c 100644 --- a/server/controllers/download.ts +++ b/server/controllers/download.ts | |||
@@ -132,7 +132,7 @@ function checkAllowResult (res: express.Response, allowParameters: any, result?: | |||
132 | if (!result || result.allowed !== true) { | 132 | if (!result || result.allowed !== true) { |
133 | logger.info('Download is not allowed.', { result, allowParameters }) | 133 | logger.info('Download is not allowed.', { result, allowParameters }) |
134 | res.status(HttpStatusCode.FORBIDDEN_403) | 134 | res.status(HttpStatusCode.FORBIDDEN_403) |
135 | .json({ error: result.errorMessage || 'Refused download' }) | 135 | .json({ error: result?.errorMessage || 'Refused download' }) |
136 | 136 | ||
137 | return false | 137 | return false |
138 | } | 138 | } |