Socket
Socket
Sign inDemoInstall

express-request-id

Package Overview
Dependencies
1
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.1 to 1.2.0

2

index.js

@@ -11,3 +11,3 @@ 'use strict';

return function (req, res, next) {
req.id = uuid[options.uuidVersion](options, options.buffer, options.offset);
req.id = req.headers['x-request-id'] || uuid[options.uuidVersion](options, options.buffer, options.offset);
if (options.setHeader) {

@@ -14,0 +14,0 @@ res.setHeader('X-Request-Id', req.id);

{
"name": "express-request-id",
"version": "1.1.1",
"version": "1.2.0",
"description": "Generate UUID for request and add it to headers",

@@ -5,0 +5,0 @@ "main": "index.js",

# express-request-id [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]
Generate UUID for request and add it to `X-Request-Id` header.
Generate UUID for request and add it to `X-Request-Id` header. In case request contains `X-Request-Id` header, uses its value instead.

@@ -5,0 +5,0 @@ ```js

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc