
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
http-lambda-proxy
Advanced tools
Proxy HTTP requests to AWS Lambda.
Requests format is compatible with the serverless-http
module, allowing developers to run full featured REST/HTTP services as lambda funtions.
npm i http-lambda-proxy
The following examples describe how to use http-lambda-proxy
with restana
:
const lambdaProxy = require('http-lambda-proxy')
const proxy = lambdaProxy({
target: process.env.FUNCTION_NAME,
region: process.env.AWS_REGION
})
const service = require('restana')()
service.all('/*', (req, res) => {
proxy(req, res, req.url, {}))
})
service.start(8080)
In this example, we proxy all http requests on port 8080 to an AWS Lambda.
region *
Set the AWS Region of the target downstream lambda.
target *
AWS Lambda funcion name, version, or alias.
Set to "Tail" to include the execution log in the response. Default: "None"
Specify a version or alias to invoke a published version of the function.
Up to 3583 bytes of base64-encoded data about the invoking client to pass to the function in the context object.
Function wrapper to AWS Lambda invocation proxy. Allows to overwrite default implementation.
Any other AWS.Lambda constructor option is allowed: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Lambda.html
More details on aws-sdk / lambda / invoke
: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Lambda.html#invoke-property
proxy(
originReq, // http.IncomingMessage
originRes, // http.ServerResponse
req.url, // Request URL
{} // Options described below
)
Called when the remote lambda response is received. If defined, default behavior is overwritten.
Called to rewrite the headers of the response, before them being copied over to the outer response. It must return the new headers object.
The following alternatives describe the supported response formats:
{
"headers": {
// ...
},
"statusCode": 200,
"body": // ...
}
exports.handler = async function () {
return JSON.stringify({})
}
MIT
You can support the maintenance of this project:
nano_3zm9steh8mb374f8be3rbytqhgzzarczhwtxhihkqt83a4m46oa3xidfiauc
rarQgNuiqF9gFLLwd5fdku4jYa9EXpiyCp
TJ5Bbf9v4kpptnRsePXYDvnYcYrS5Tyxus
bc1qcrr58venyh54ztvkqym39p9rhnxg4308t0802f
0xD73c8E63a83eBD8Df3fB3d0090f1fe7a1eEB980B
FAQs
Proxy HTTP requests to AWS Lambda
The npm package http-lambda-proxy receives a total of 489 weekly downloads. As such, http-lambda-proxy popularity was classified as not popular.
We found that http-lambda-proxy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.