Dan Van Brunt
09/17/2021, 7:32 PMnew Api(this, "Api", {
routes: {
"GET /api/*": {
url: "<http://domain.com>",
},
},
});
https://docs.serverless-stack.com/constructs/Api#configuring-http-proxy-routesMaged Mortaga
09/17/2021, 7:34 PM{proxy+}
keyword
https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-set-up-simple-proxy.html
So something like:
new Api(this, "Api", {
routes: {
"GET /{proxy+}": {
url: "<http://domain.com>",
},
},
});
Maged Mortaga
09/17/2021, 7:35 PMANY
instead of GET
Dan Van Brunt
09/17/2021, 7:36 PMDan Van Brunt
09/17/2021, 7:36 PMFrank
new Api(this, "Api", {
routes: {
"$default": {
url: "<http://domain.com>",
},
},
});
Adrián Mouly
09/18/2021, 2:50 AM/
?Adrián Mouly
09/18/2021, 2:51 AMFrank
$default
is actually similar to ANY /{proxy+}
in a way. It will catch all un-matched routes.Dan Van Brunt
09/18/2021, 1:18 PMFrank