Skip to content
Closed
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions src/server/db/migrations/027_add_sites_hosting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ const DEFAULT_SITES_CONFIG = {
extensionDays: 7,
},
upload: {
maxUploadBytes: 10 * 1024 * 1024,
maxExtractedBytes: 10 * 1024 * 1024,
maxUploadBytes: 100 * 1024 * 1024,
maxExtractedBytes: 100 * 1024 * 1024,
maxFiles: 500,
allowedExtensions: [
'html',
Expand Down
6 changes: 3 additions & 3 deletions src/server/lib/sites/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
} from 'shared/config';
import type { SitesConfig } from 'server/services/types/globalConfig';

export const TEN_MIB = 10 * 1024 * 1024;
export const UPLOAD_LIMIT_MIB = 100 * 1024 * 1024;
export const DEFAULT_HOST_PREFIX = 'site';
export const DEFAULT_ALLOWED_EXTENSIONS = [
'html',
Expand Down Expand Up @@ -158,8 +158,8 @@ export function resolveSitesConfig(config?: SitesConfig | null): ResolvedSitesCo
extensionDays: config?.ttl?.extensionDays ?? 7,
},
upload: {
maxUploadBytes: config?.upload?.maxUploadBytes ?? TEN_MIB,
maxExtractedBytes: config?.upload?.maxExtractedBytes ?? TEN_MIB,
maxUploadBytes: config?.upload?.maxUploadBytes ?? UPLOAD_LIMIT_MIB,
maxExtractedBytes: config?.upload?.maxExtractedBytes ?? UPLOAD_LIMIT_MIB,
maxFiles: config?.upload?.maxFiles ?? 500,
allowedExtensions: normalizeAllowedExtensions(config),
},
Expand Down
4 changes: 2 additions & 2 deletions src/server/lib/sites/validation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import zlib from 'zlib';
import { normalizeGatewayPath, validateSiteUpload } from './validation';

const DEFAULT_OPTIONS = {
maxUploadBytes: 10 * 1024 * 1024,
maxExtractedBytes: 10 * 1024 * 1024,
maxUploadBytes: 100 * 1024 * 1024,
maxExtractedBytes: 100 * 1024 * 1024,
maxFiles: 500,
allowedExtensions: ['html', 'zip', 'json', 'md', 'markdown', 'txt', 'js'],
};
Expand Down
Loading