Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

elysia-requestid

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elysia-requestid

Elysia Request ID Plugin

  • 1.0.9
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
382
decreased by-46.2%
Maintainers
1
Weekly downloads
 
Created
Source

Elysia Request ID

Elysia plugin to create or forward Request IDs.

Installation

bun add --exact elysia-requestid

Usage

import { requestID } from "elysia-requestid"; // 1. Import
import Elysia from "elysia";

new Elysia()
  .use(requestID()) // 2. Use
  .get("/", ({ requestID }) => {
    return `Hello ${requestID}`; // 3. Available in Context
  })
  .listen(3000);

Options (with defaults)

requestID({
  // The function to use to generate a request ID
  uuid: crypto.randomUUID,

  // The header to use for the request ID
  header: "X-Request-ID",
});

FAQs

Package last updated on 06 Dec 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc