Tune download (#2)
* s2-2 * allowedPrivateNetworks * style * Proxyの間にあると誤解しそうなのでconfigの記述順を変更 * Fix error handler
This commit is contained in:
parent
7e30910ab8
commit
e1a8b158e0
7 changed files with 106 additions and 23 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue