-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Why doesn't {proxy+} work as catchall ? #2072
Comments
It happens because here Lines 1832 to 1839 in 79838b0
|
Your route I would expect @app.route('/resource/{proxy+}', methods=['GET', 'POST'])
def resource_proxy():
# proxy contains the path information.
# For instance, if you access /resource/a/b/c, proxy will be "a/b/c"
return {
"message": "You've accessed the proxy endpoint.",
"path": app.current_request.uri_params.get("proxy+")
} and...
Also: The greedy
If you don't care about nested paths (eg
which does the trick:
Frustratingly, and why I'm here in the chalice github right now and found your ticket, and perhaps maybe at the core of your problem, is that at least with chalice @app.route('/resource/{proxy+}', methods=['GET', 'POST'])
def resource_proxy():
return {
"message": "You've accessed the proxy endpoint.",
"path": app.current_request.uri_params.get("proxy+")
} This happens:
Again, when deployed to AWS, this works perfectly fine. However, in the |
I have tried all combinations and I can't figure out why a generic catch all work. I probably miss something super basic, but at a point where I may have to move to something else. This is such a super great framework, if I could get a reverse proxy type setup working! Can anyone help please ?
The text was updated successfully, but these errors were encountered: