Skip to content

Conversation

@michaelbrewer
Copy link
Contributor

@michaelbrewer michaelbrewer commented Feb 7, 2022

Issue #, if available:

Description of changes:

WARNING: FOR RFC PURPOSES ONLY

Checklist

Breaking change checklist

RFC issue #:

  • Migration process documented
  • Implement warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 7, 2022
@github-actions github-actions bot added the feature New feature or functionality label Feb 7, 2022
@walmsles
Copy link
Contributor

walmsles commented Feb 8, 2022

The PR allows for multiple statically defined Origins. Some use cases may have more dynamic requirements, e.g. An API allowing only subscribed websites (origins) to consume the API from their front-end. This may be a more obscure use case and not the norm though - so need to apply the tenets to this comment as appropriate.

@codecov-commenter
Copy link

codecov-commenter commented Feb 9, 2022

Codecov Report

Merging #1010 (1adce36) into develop (f62d07a) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@ Coverage Diff @@ ## develop #1010 +/- ## ======================================== Coverage 99.88% 99.88% ======================================== Files 119 119 Lines 5423 5432 +9 Branches 618 620 +2 ======================================== + Hits 5417 5426 +9  Misses 2 2 Partials 4 4 
Impacted Files Coverage Δ
aws_lambda_powertools/event_handler/api_gateway.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f62d07a...1adce36. Read the comment docs.

@michaelbrewer
Copy link
Contributor Author

have more dynamic requirements, e.g. An API allowing only subscribed websites (origins) to consume the API from

This is where people might shoot themselves in the foot ? :)

@walmsles
Copy link
Contributor

Agree. Need to temper feature offered to close the loop on people doing silly things. Because CORS is generally well misunderstood 🙂

@michaelbrewer
Copy link
Contributor Author

Agree. Need to temper feature offered to close the loop on people doing silly things. Because CORS is generally well misunderstood 🙂

And universally hated

@heitorlessa heitorlessa added revisit-in-3-months Requires more customers feedback before making or revisiting a decision need-customer-feedback Requires more customers feedback before making or revisiting a decision do-not-merge labels Feb 25, 2022
@michaelbrewer
Copy link
Contributor Author

(closing for now and will reopening when capacity is available for this)

@major-mayer
Copy link

I would relly love to see this getting merged soon.
We are using AWS Lambda Powertools with the Application Load Balancer (because of timeout limitation of the API Gateway), so there is no CORS configuration and we have to handle this ourselves.

The Lambda function is called from multiple origins, but it's a fixed list, so no dynamic matching needed.
This PR would be a very nice improvement, so that i don't have to manually check if the origin in the header is in my list of allowed origins.

@michaelbrewer
Copy link
Contributor Author

@major-mayer - possibly August this might get some eyes.

@sthulb sthulb closed this Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge feature New feature or functionality need-customer-feedback Requires more customers feedback before making or revisiting a decision revisit-in-3-months Requires more customers feedback before making or revisiting a decision size/M Denotes a PR that changes 30-99 lines, ignoring generated files. tests

6 participants