@fastify/aws-lambda
Advanced tools
Comparing version 3.4.0 to 3.4.1
@@ -19,2 +19,3 @@ 'use strict' | ||
options.retainStage = options.retainStage !== undefined ? options.retainStage : false | ||
options.proxiedPathParameterAsPath = options.proxiedPathParameterAsPath !== undefined ? options.proxiedPathParameterAsPath : false | ||
let currentAwsArguments = {} | ||
@@ -43,4 +44,3 @@ if (options.decorateRequest) { | ||
const method = event.httpMethod || (event.requestContext && event.requestContext.http ? event.requestContext.http.method : undefined) | ||
// NOTE: Use `event.pathParameters.proxy` if available ({proxy+}); fall back to `event.path` | ||
let url = (event.pathParameters && event.pathParameters.proxy && `/${event.pathParameters.proxy}`) || event.path || event.rawPath || '/' // seen rawPath for HTTP-API | ||
let url = (options.pathParameterUsedAsPath && event.pathParameters && event.pathParameters[options.pathParameterUsedAsPath] && `/${event.pathParameters[options.pathParameterUsedAsPath]}`) || event.path || event.rawPath || '/' // seen rawPath for HTTP-API | ||
// NOTE: if used directly via API Gateway domain and /stage | ||
@@ -47,0 +47,0 @@ if (!options.retainStage && event.requestContext && event.requestContext.stage && |
@@ -29,3 +29,3 @@ { | ||
"license": "MIT", | ||
"version": "3.4.0", | ||
"version": "3.4.1", | ||
"main": "index.js", | ||
@@ -32,0 +32,0 @@ "type": "commonjs", |
@@ -32,2 +32,3 @@ # Introduction | ||
| retainStage | Retain the stage part of the API Gateway URL | `false` | | ||
| pathParameterUsedAsPath | Use a defined pathParameter as path (i.e. `'proxy'`) | `false` | | ||
@@ -34,0 +35,0 @@ ## 📖Example |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23277
158