Static
Private
Readonly
PRESETS
PRESETS: {
api: {
environment: {
https: boolean;
production: boolean;
};
logging: {
enabled: boolean;
failedLogins: boolean;
format: string;
level: string;
rateLimitViolations: boolean;
suspiciousRequests: boolean;
};
performance: {
caching: {
enabled: boolean;
etag: boolean;
lastModified: boolean;
maxAge: number;
};
compression: {
brotli: boolean;
enabled: boolean;
level: number;
threshold: number;
};
monitoring: {
enabled: boolean;
largePayloadThreshold: number;
logLargePayloads: boolean;
logSlowRequests: boolean;
slowRequestThreshold: number;
};
};
security: {
auth: {
jwt: {
algorithms: string[];
maxAge: number;
};
};
cors: {
credentials: boolean;
origin: boolean;
};
csrf: {
cookieName: string;
enabled: boolean;
excludedMethods: string[];
headerName: string;
tokenLength: number;
};
fileUpload: {
allowedExtensions: string[];
allowedMimeTypes: string[];
enabled: boolean;
maxFileSize: number;
stripMetadata: boolean;
};
headers: {
crossOriginEmbedderPolicy: string;
crossOriginOpenerPolicy: string;
crossOriginResourcePolicy: string;
csp: {
connectSrc: string[];
defaultSrc: string[];
fontSrc: string[];
frameSrc: string[];
imgSrc: string[];
mediaSrc: string[];
objectSrc: string[];
scriptSrc: string[];
styleSrc: string[];
};
permissionsPolicy: {
camera: string[];
geolocation: string[];
microphone: string[];
payment: string[];
};
referrerPolicy: string;
xContentTypeOptions: boolean;
xFrameOptions: string;
};
rateLimit: {
enabled: boolean;
max: number;
message: string;
statusCode: number;
windowMs: number;
};
sanitization: {
enabled: boolean;
maxBodySize: number;
maxQuerySize: number;
noSqlInjection: boolean;
sqlInjection: boolean;
xss: boolean;
};
};
};
strict: {
environment: {
https: boolean;
production: boolean;
};
logging: {
enabled: boolean;
failedLogins: boolean;
format: string;
level: string;
rateLimitViolations: boolean;
suspiciousRequests: boolean;
};
performance: {
caching: {
enabled: boolean;
etag: boolean;
lastModified: boolean;
maxAge: number;
};
compression: {
brotli: boolean;
enabled: boolean;
level: number;
threshold: number;
};
monitoring: {
enabled: boolean;
largePayloadThreshold: number;
logLargePayloads: boolean;
logSlowRequests: boolean;
slowRequestThreshold: number;
};
};
security: {
auth: {
jwt: {
algorithms: string[];
maxAge: number;
};
session: {
httpOnly: boolean;
maxAge: number;
sameSite: string;
secure: boolean;
};
};
cors: {
credentials: boolean;
origin: boolean;
};
csrf: {
cookieName: string;
cookieOptions: {
httpOnly: boolean;
maxAge: number;
sameSite: string;
secure: boolean;
};
enabled: boolean;
excludedMethods: string[];
headerName: string;
tokenLength: number;
};
fileUpload: {
enabled: boolean;
};
headers: {
crossOriginEmbedderPolicy: string;
crossOriginOpenerPolicy: string;
crossOriginResourcePolicy: string;
csp: {
connectSrc: string[];
defaultSrc: string[];
fontSrc: string[];
frameSrc: string[];
imgSrc: string[];
mediaSrc: string[];
objectSrc: string[];
reportUri: string;
scriptSrc: string[];
styleSrc: string[];
};
hsts: {
includeSubDomains: boolean;
maxAge: number;
preload: boolean;
};
permissionsPolicy: {
accelerometer: string[];
camera: string[];
geolocation: string[];
gyroscope: string[];
magnetometer: string[];
microphone: string[];
payment: string[];
usb: string[];
};
referrerPolicy: string;
xContentTypeOptions: boolean;
xFrameOptions: string;
};
rateLimit: {
enabled: boolean;
max: number;
message: string;
statusCode: number;
windowMs: number;
};
sanitization: {
enabled: boolean;
maxBodySize: number;
maxQuerySize: number;
noSqlInjection: boolean;
sqlInjection: boolean;
xss: boolean;
};
};
};
webapp: {
environment: {
https: boolean;
production: boolean;
};
logging: {
enabled: boolean;
failedLogins: boolean;
format: string;
level: string;
rateLimitViolations: boolean;
suspiciousRequests: boolean;
};
performance: {
caching: {
enabled: boolean;
etag: boolean;
lastModified: boolean;
maxAge: number;
};
compression: {
brotli: boolean;
enabled: boolean;
level: number;
threshold: number;
};
monitoring: {
enabled: boolean;
largePayloadThreshold: number;
logLargePayloads: boolean;
logSlowRequests: boolean;
slowRequestThreshold: number;
};
};
security: {
auth: {
jwt: {
algorithms: string[];
maxAge: number;
};
session: {
httpOnly: boolean;
maxAge: number;
sameSite: string;
secure: boolean;
};
};
cors: {
credentials: boolean;
methods: string[];
origin: boolean;
};
csrf: {
cookieName: string;
enabled: boolean;
excludedMethods: string[];
headerName: string;
tokenLength: number;
};
fileUpload: {
allowedExtensions: string[];
allowedMimeTypes: string[];
enabled: boolean;
maxFileSize: number;
stripMetadata: boolean;
};
headers: {
crossOriginEmbedderPolicy: string;
crossOriginOpenerPolicy: string;
crossOriginResourcePolicy: string;
csp: {
connectSrc: string[];
defaultSrc: string[];
fontSrc: string[];
frameSrc: string[];
imgSrc: string[];
mediaSrc: string[];
objectSrc: string[];
scriptSrc: string[];
styleSrc: string[];
};
permissionsPolicy: {
camera: string[];
geolocation: string[];
microphone: string[];
payment: string[];
};
referrerPolicy: string;
xContentTypeOptions: boolean;
xFrameOptions: string;
};
rateLimit: {
enabled: boolean;
max: number;
message: string;
statusCode: number;
windowMs: number;
};
sanitization: {
enabled: boolean;
maxBodySize: number;
maxQuerySize: number;
noSqlInjection: boolean;
sqlInjection: boolean;
xss: boolean;
};
};
};
} = ...