From what I can tell, at least with chalice 1.31.2, the {proxy+} glob seems to be broken in the local development server, even though it works properly in AWS. When I try to use nested URLs with this code:
from chalice import Chalice
app = Chalice(app_name='chalice-proxy-example')
@app.route('/')
def index():
return {"message": "Welcome to the root endpoint!"}
@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+")
}
When deployed to AWS, this works perfectly fine. However, in the chalice local server, it won't route.
The weird thing is, I pretty much can't find any documentation for how {proxy+} is supposed to work Chalice. BUT, we have lots of code running the uses it. Is it some weird loophole? The more I try to figure out whats going on, the more lost I get.
From what I can tell, at least with chalice
1.31.2
, the{proxy+}
glob seems to be broken in the local development server, even though it works properly in AWS. When I try to use nested URLs with this code:This happens:
When deployed to AWS, this works perfectly fine. However, in the chalice local server, it won't route.
The weird thing is, I pretty much can't find any documentation for how
{proxy+}
is supposed to work Chalice. BUT, we have lots of code running the uses it. Is it some weird loophole? The more I try to figure out whats going on, the more lost I get.