1.0.0 • Published 6 years ago

single-session-middleware v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

single-session-middleware

Keep a single and latest session in the server end.

Installation

$ npm i single-session-middleware -D

Node.js

import express from 'express'
import singleSession from 'single-session-middleware'
import proxy from 'http-proxy-middleware'

const app = express()

app.use(singleSession({
  name: 'PHPSESSID'
}))

app.use(proxy({
  target: 'http://192.168.1.1',
  changeOrigin: true
}))

app.listen(3000)

Options

  • options.name: string, the cookie-name that some programming languages. Default: connect.sid.

References

License

MIT