forked from unimatrix/web
Allow full-size emblems and preserve safe web release retention
This commit is contained in:
parent
320dce718a
commit
d28edebb91
1 changed files with 47 additions and 67 deletions
|
|
@ -1,6 +1,8 @@
|
|||
export function panelBodyLimit(method,path){
|
||||
if(method!=='POST')return 65536;
|
||||
if(path==='/api/internal-mail/messages/send')return 32*1024*1024;
|
||||
// Emblem endpoints enforce their own raster validation and 2 MB image cap.
|
||||
if(/^\/api\/(?:clan|company)-emblems\/[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}$/i.test(path))return 2*1024*1024;
|
||||
if(path==='/api/ban-evidence')return 7*1024*1024;
|
||||
// A validated 2 MB image plus bounded multipart headers.
|
||||
if(path==='/api/account/avatar')return 2*1024*1024+65536;
|
||||
|
|
|
|||
Loading…
Reference in a new issue

Staff