Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Merge branch 'main' into feat/cors-middleware
  • Loading branch information
sdangol authored Sep 18, 2025
commit 1456e7badc2dab0b30a61a78424e46ea727a73a6
14 changes: 13 additions & 1 deletion packages/event-handler/src/rest/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,17 @@ export const DEFAULT_CORS_OPTIONS = {
'X-Amz-Security-Token',
],
exposeHeaders: [],
credentials: false,
credentials: false
};

export const DEFAULT_COMPRESSION_RESPONSE_THRESHOLD = 1024;

export const CACHE_CONTROL_NO_TRANSFORM_REGEX =
/(?:^|,)\s*?no-transform\s*?(?:,|$)/i;

export const COMPRESSION_ENCODING_TYPES = {
GZIP: 'gzip',
DEFLATE: 'deflate',
IDENTITY: 'identity',
ANY: '*',
} as const;
1 change: 1 addition & 0 deletions packages/event-handler/src/rest/middleware/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { compress } from './compress.js';
export { cors } from './cors.js';
5 changes: 5 additions & 0 deletions packages/event-handler/src/types/rest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ type CorsOptions = {
maxAge?: number;
};

type CompressionOptions = {
encoding?: 'gzip' | 'deflate';
threshold?: number;
};

export type {
CompiledRoute,
CorsOptions,
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.