lambda-proxy
lambda-proxy copied to clipboard
Can't use ()? in regex path definition
@app.route(
r"/test/<regex(user(\d+)?):user>/<sport>" )
def test(user, sport):
return ("OK", "text/plain", "YO")
this will fail here https://github.com/vincentsarago/lambda-proxy/blob/ac5ad110e16c5bba98739f07cc0ecdfae71e7b57/lambda_proxy/proxy.py#L401-L413
because url_args = route_expr.match(url).groups() will return ('user1234', '1234', 'rugby')
fix
Use patterns ?