Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/app/server/routes/publish.post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ export default eventHandler(async (event) => {
);
const contentLength = Number(getHeader(event, "content-length"));

// 20mb limit for now
if (!whitelisted && contentLength > 1024 * 1024 * 20) {
const maxPayloadSizeMb = 120;

if (!whitelisted && contentLength > 1024 * 1024 * maxPayloadSizeMb) {
// Payload too large
throw createError({
statusCode: 413,
message:
"Max payload limit is 20mb! Feel free to apply for the whitelist: https://github.com/stackblitz-labs/pkg.pr.new/blob/main/.whitelist",
message: `Max payload limit is ${maxPayloadSizeMb}mb! Feel free to apply for the whitelist: https://github.com/stackblitz-labs/pkg.pr.new/blob/main/.whitelist`,
});
}

Expand Down
Loading