-
Notifications
You must be signed in to change notification settings - Fork 421
What is the proper decoration for a {proxy+} #700
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
Comments
Hey @gwlester, could you try the following and let us know if it works for you? @app.get("/proxy/.+") We made a conscious decision not to support "proxy+" to prevent customers into having a single Lambda function for everything. That said, we understand there are edge cases and we support regex in the route definition, so "/proxy/.+" should match the greedy pattern you defined up there. |
@heitorlessa, thanks for the fast reply! We will try first thing Monday morning. Any chance of documenting this in the docs? |
Absolutely - I'd love to hear from you first before we add in. In fact, I'll be jet lagged by Monday, so I highly appreciate a PR if you could help. PS: You can run docs locally by using |
I will take a crack at it. It would have been assume if @app.get("/proxy/<.+">)
def proxy_service(**kwargs): would have worked to get everything pass /proxy/ passed into proxy_service. |
Yep. I know it works for API GW so it should also work for ALB. Lemme know
;-)
…On Sat, 25 Sep 2021 at 14:31, Gerald Leter ***@***.***> wrote:
I will take a crack at it.
It would have been assume if
@app.get("/proxy/<.+">)def proxy_service(**kwargs):
would have worked to get everything pass */proxy/* passed into
*proxy_service*.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#700 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZPQBDLYUIGPCYZVVUXBU3UDYBPLANCNFSM5EXFUQZQ>
.
|
hey @gwlester just tested and I'm gonna send a PR updating the docs |
This is now available in the stage docs: https://awslabs.github.io/aws-lambda-powertools-python/develop/core/event_handler/api_gateway/#catch-all-routes I'm gonna resolve this for now as the feature is already available but was undocumented in the latest doc. |
What were you trying to accomplish?
We want to have a function handle proxying to an ELB.
Expected Behavior
Documentation containing the correct decoration for a proxy handler.
Current Behavior
No documentation containing the correct decoration for a proxy handler.
Possible Solution
Steps to Reproduce (for bugs)
Environment
# paste logs here
The text was updated successfully, but these errors were encountered: