Miss any of our Open RFC calls?Watch the recordings here! »

kth-node-access-log

0.2.2 • Public • Published

kth-node-access-log Build Status

Access log middleware for KTH node apps.

Usage

const express = require("express");
const app = express();
const accessLog = require("kth-node-access-log");
 
// express setup
 
app.use(accessLog({ useAccessLog: true }));
 
// later ...
 
app.listen(3000);

Options

  • useAccessLog toggles the access log on or off. Defaults to false.
  • stripHeaders contains a list of headers that should be stripped from their query string before inserted into the log entry. Defaults to:
["referer", "x-forwarded-for"];
  • format is the access log format. Defaults to:
':remote-addr - :x-forwarded-for :remote-user [:date[iso]] ":method :url HTTP/:http-version" :status :res[content-length] ":referer" ":user-agent"';
  • morganOptions options passed directly to morgan. Defaults to an empty object.

Keywords

none

Install

npm i kth-node-access-log

DownloadsWeekly Downloads

109

Version

0.2.2

License

MIT

Unpacked Size

4.59 kB

Total Files

6

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar