Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cors): append access-control-max-age header to preflight response #855

Open
wants to merge 4 commits into
base: v1
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion src/types/_headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export type TypedHeaders = Partial<Record<HTTPHeaderName, unknown>> &

"content-length": number;

"access-control-max-age": number;
"access-control-max-age": AnyString;

"retry-after": number;

Expand Down
1 change: 1 addition & 0 deletions src/utils/cors/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
appendHeaders(event, createExposeHeaders(options));
appendHeaders(event, createMethodsHeaders(options));
appendHeaders(event, createAllowHeaderHeaders(event, options));
appendHeaders(event, createMaxAgeHeader(options));

Check warning on line 212 in src/utils/cors/utils.ts

View check run for this annotation

Codecov / codecov/patch

src/utils/cors/utils.ts#L212

Added line #L212 was not covered by tests
}

/**
Expand Down