Socket
Socket
Sign inDemoInstall

koa-uuid

Package Overview
Dependencies
1
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    koa-uuid

koa uuid middleware


Version published
Weekly downloads
50
increased by19.05%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

koa-uuid

NPM version github location Build status Dependency Status License Downloads

koa uuid middleware

Installation

$ npm install koa-uuid

Configuration

default configuration

const options = {
  signed: false,
  maxAge: 1000 * 60 * 60 * 24 * 365 * 10,
  httpOnly: true,
}

Example

const uuid = require('koa-uuid')
const Koa = require('koa')

// options is not reuqire and will be assign
const options = {
  maxAge,
  expires,
  path,
  domain,
  secure,
  httpOnly,
  sameSite,
  signed,
  overwrite,
  ...
}

const app = new Koa()
app.use(uuid(options))

Attention

configuration signed: true require app.keys, otherwise signed will always be false

const uuid = require('koa-uuid')
const Koa = require('koa')

const app = new Koa()

app.keys = ['secret', 'key'];
app.use(uuid({ signed: true }));

License

MIT

Keywords

FAQs

Last updated on 02 Sep 2017

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.

Install

Related posts

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