- ApiResponse is now static, so it's easier to use in your own functions, thanks to Aaron J. Lang
- bugfix for greedy path routing when the API_GW request type is used, thanks to Aaron J. Lang
- bumping version for sync with claudia
- easier handling for Lambda environment and stage variables, using
{mergeVars: true}
- API builder will not explode, but provide a helpful error message when invalid or circular JSON structures passed as application/json requests or responses
- support for API Gateway Binary content handling
- expose CORS Max-Age in the config, so Claudia can set it even when default CORS settings are used on API Gateway
- Allow ApiResponse to be returned from an interceptor, so it can send back a custom error code
- enable max-age to be specified on CORS headers (thanks to Philipp Holly) \
- limit magic location header only to actual 3xx redirects (301 and 302), allowing other codes such as 304 to be handled differently, fixes issue 20
- bugfix for setting the Access-Control-Allow-Credentials header, thanks to StampStyle
- bugfix for intercepting non-web requests, where 2.0 introduced backwards incompatibility wrapping even non-API Gateway requests into proxyRequest. The behaviour is now compatible with 1.x, where non-web requests are sent to the intercepting function unmodified.
- support for API Gateway Lambda Proxy Integrations
- support for routing via .ANY method
- support for selecting request type (either CLAUDIA_API_BUILDER or AWS_PROXY)
- support for dynamic response codes
- completed CORS support (all HTTP method request handlers can now also limit CORS allowed origins, instead of just the OPTIONS one)
- support for asynchronous CORS origin filters
- stopping support for Node 0.10
- (will only work with claudia 2.x)
- support for custom authorizers
- by default, API processing stops the node VM using the callbackWaitsForEmptyEventLoop Lambda context parameter. This is to prevent runaway node.js events caused by third party libs causing the Lambda VM to become stuck after a request completes. If you really want the VM execution to continue until the event loop empties, even after your API process is done, then set
lambdaContext.callbackWaitsForEmptyEventLoop
totrue
in your request handler.
- support for intercepting and modifying requests
- shortcut for configuring stage variables during deployment
- you can now provide a handler for unsupported event formats, and invoke the same Lambda from a source that's not API Gateway