Skip to content

feat(lambda-http): add example with tower_http crate #425

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

Merged
merged 3 commits into from
Feb 19, 2022

Conversation

nmoutschen
Copy link
Contributor

Issue #, if available:

Description of changes:

This adds an example for the lambda-http crate using tower_http::cors::CorsLayer to inject CORS on responses.

I'm also taking that opportunity to add all features to the tower re-export, and clean some clippy warnings such as large variants for the LambdaRequest struct on lambda_http.

By submitting this pull request

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I confirm that I've made a best effort attempt to update all relevant documentation.

@nmoutschen nmoutschen marked this pull request as draft February 19, 2022 15:02
@nmoutschen nmoutschen marked this pull request as ready for review February 19, 2022 15:25
Copy link
Contributor

@calavera calavera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please, don't make changes to the http event payloads, I'm about to replace them.

@nmoutschen
Copy link
Contributor Author

please, don't make changes to the http event payloads, I'm about to replace them.

Agreed! I've reverted the changes in lambda-http/src.

@nmoutschen nmoutschen added the 0.5 label Feb 19, 2022
Copy link
Contributor

@calavera calavera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice example!

@calavera calavera merged commit e1797cc into master Feb 19, 2022
@calavera calavera deleted the tower-http-support branch February 19, 2022 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants