diff options
| author | MeiMei <30769358+mei23@users.noreply.github.com> | 2021-09-03 21:00:44 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2021-09-03 21:13:06 +0900 |
| commit | e1a8b158e04ad567d92d8daf3cc0898ee18f1a2e (patch) | |
| tree | 436c3a15daed01189abdc0c08f21ac9e71fc034e /src/server/proxy/proxy-media.ts | |
| parent | Update CONTRIBUTING.md (diff) | |
| download | sharkey-e1a8b158e04ad567d92d8daf3cc0898ee18f1a2e.tar.gz sharkey-e1a8b158e04ad567d92d8daf3cc0898ee18f1a2e.tar.bz2 sharkey-e1a8b158e04ad567d92d8daf3cc0898ee18f1a2e.zip | |
Tune download (#2)
* s2-2
* allowedPrivateNetworks
* style
* Proxyの間にあると誤解しそうなのでconfigの記述順を変更
* Fix error handler
Diffstat (limited to 'src/server/proxy/proxy-media.ts')
| -rw-r--r-- | src/server/proxy/proxy-media.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/proxy/proxy-media.ts b/src/server/proxy/proxy-media.ts index fb38a5c07b..3bd65dfe67 100644 --- a/src/server/proxy/proxy-media.ts +++ b/src/server/proxy/proxy-media.ts @@ -39,8 +39,8 @@ export async function proxyMedia(ctx: Koa.Context) { } catch (e) { serverLogger.error(e); - if (typeof e == 'number' && e >= 400 && e < 500) { - ctx.status = e; + if (typeof e.statusCode === 'number' && e.statusCode >= 400 && e.statusCode < 500) { + ctx.status = e.statusCode; } else { ctx.status = 500; } |