-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(apigateway): cors preflight support #4211
Conversation
adds support for CORS preflight (OPTIONS) requests on resources. currently supports: origin, methods, headers, credentials, status code implemented during a live twitch stream on sep 24, 2019
Thanks so much for taking the time to contribute to the AWS CDK ❤️ We will shortly assign someone to review this pull request and help get it
|
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Looks good and we could really, really use this. Anything I can do to help get the PR over the line? |
@elhedran thanks for this nudge. I haven't had time to take this through the finish line. The main thing I'd like to add here (since I believe it might require an API change) is support recursive CORS configuration. Something like |
If you are interested to take a whack at it, it will be awesome! Otherwise, I hope I'll be able to find the time in the coming weeks. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
* Access-Control-Allow-Methods and Access-Control-Allow-Headers headers) | ||
* can be cached. | ||
* | ||
* To disable caching altogther use `disableCache: true`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't specifying 0
(or less) here be an effective way to signal "I don't want no caching"? I'm not too sure the extra flag is actually so useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spec doesn't say anything about 0
and we can't express -1
as a Duration
.
readonly exposeHeaders?: string[]; | ||
} | ||
|
||
export class Cors { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please give this class a private constructor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request is now being automatically merged. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Work in progress: adds support for CORS preflight (OPTIONS) requests on resources.
currently supports: origin, methods, headers, credentials, status code
Fixes #906
Implemented during a live twitch stream on sep 24, 2019
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license