Le fixes part 1
This commit is contained in:
@ -21,9 +21,10 @@ export async function onRequestPost(context: RequestContext) {
|
||||
return jsonError("Forbidden", 403);
|
||||
|
||||
if (
|
||||
context.request.headers
|
||||
!context.request.headers
|
||||
.get("content-type")
|
||||
?.startsWith("multipart/form-data; boundary=")
|
||||
?.toLowerCase()
|
||||
.startsWith("multipart/form-data;")
|
||||
)
|
||||
return jsonError("Invalid content type", 400);
|
||||
|
||||
|
Reference in New Issue
Block a user