
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@schibsted/middy-access-log
Advanced tools
Middy middleware for logging processed requests in an access-log like fashion. Optimised for JSON loggers e.g. Bunyan or Pino.
This middleware logs processed requests in an access log like fashion. I suggest using it together with @schibsted/middy-error-handler
This access log is optimised for JSON loggers e.g. bunyan or pino
Sets headers in after
and onError
phases.
To install this middleware you can use NPM:
npm install --save @schibsted/middy-access-log
logger
(defaults to console
) - a logging function that is invoked with the current error as an argument. You can pass false
if you don't want the logging to happen.level
(defaults to info
) - log level to use for the log entriesexcludeHeaders
(array of header names, defaults to []
) - prevent specified headers from showing up in logs (e.g. user credentials)See the sample usage below.
const middy = require('@middy/core');
const accessLog = require('@schibsted/middy-access-log');
const bunyan = require('bunyan');
const logger = bunyan.createLogger({name: "myapp"});
const handler = middy(async () => ({
statusCode: 200,
body: JSON.stringify({ foo: 'bar' }),
}));
handler
.use(accessLog({ logger }));
Everyone is very welcome to contribute to this repository. Feel free to raise issues or to submit Pull Requests.
4.0.2 (2022-08-29)
FAQs
Middy middleware for logging processed requests in an access-log like fashion. Optimised for JSON loggers e.g. Bunyan or Pino.
The npm package @schibsted/middy-access-log receives a total of 5 weekly downloads. As such, @schibsted/middy-access-log popularity was classified as not popular.
We found that @schibsted/middy-access-log demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers 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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.