
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
jlocke-express-middleware
Advanced tools
Express middleware to store requests metadata into a Elastic.
Express middleware to store requests metadata to an Elastic instance. We use it in JLocke project and other internal ones.
npm i --save jlocke-express-middleware
Please visit the tests to see a full example. NOTES:
jLocke.init(uri, opts) -> PromiseThe middleware setup expects:
uri (string) - The database uri to connect to.opts (object) - DB optional values:
trace (boolean) - To enable Elastic tracing. (default: false)indexRequests (string) - Name of the Elastic index to store the requests info. (default: "api-requests-MM-DD-YYY")typeRequests (string) - Elastic type of the element to store the requests info. (default: "requests")indexErrors (string) - Name of the Elastic index to store the errors info. (default: "api-errors-MM-DD-YYY")typeErrors (string) - Elastic type of the element to store the errors info. (default: "errors")jLocke.error(message, error, opts) -> PromiseTo track the errors, ie: uncaughException, unhandledPromise. The middleware setup expects:
message (string) - Custom error message.error (object) - JavaScript Error object.opts (object) - Optional values:
userId (string) - User identifier to trace the error.jLocke.express(opts) -> functionTo track the Express requests info. The middleware expects to receive the next parameters. Please visit the tests for more details.
opts (object) - Optional values:
path (string) - To store only the requests through this subpath. (default: null)hide (object) - To avoid to store sensitive data in the DB for a POST route. (default: {})
path (string) - The substring of the path to exlude stuff (ie: "login").field (string) - Name of the object field to exclude (ie: "password").Apart from the ones included by Express you can attach to the req the user ID to allow tracing:
userId (string) - User identifier.Example here.
Please check this link before a contribution.
FAQs
Express middleware to store requests metadata into a Elastic.
The npm package jlocke-express-middleware receives a total of 0 weekly downloads. As such, jlocke-express-middleware popularity was classified as not popular.
We found that jlocke-express-middleware 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.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.