# remove_date

> remove Date header from http(s) response

Latest version **0.5.0** (published 2017-12-30) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install remove_date
pnpm add remove_date
yarn add remove_date
bun add remove_date
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.0 |
| Published | 2017-12-30 |
| First published | 2015-01-09 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | hex7c0 |
| Maintainers | hex7c0 |
| Keywords | date, header |

## Links

- npm: https://www.npmjs.com/package/remove_date
- Repository: https://github.com/hex7c0/remove_date
- Issues: https://github.com/hex7c0/remove_date/issues
- npm.io page: https://npm.io/package/remove_date

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 0.5.0 (latest) — 2017-12-30
- 0.4.0 — 2017-02-04
- 0.3.0 — 2016-09-12
- 0.2.2 — 2015-12-02
- 0.2.1 — 2015-08-24
- 0.2.0 — 2015-08-23
- 0.1.1 — 2015-07-30
- 0.1.0 — 2015-03-07
- 0.0.1 — 2015-01-09

## README

# [remove_date](https://github.com/hex7c0/remove_date)

[![NPM version](https://img.shields.io/npm/v/remove_date.svg)](https://www.npmjs.com/package/remove_date)
[![Linux Status](https://img.shields.io/travis/hex7c0/remove_date.svg?label=linux-osx)](https://travis-ci.org/hex7c0/remove_date)
[![Windows Status](https://img.shields.io/appveyor/ci/hex7c0/remove_date.svg?label=windows)](https://ci.appveyor.com/project/hex7c0/remove_date)
[![Dependency Status](https://img.shields.io/david/hex7c0/remove_date.svg)](https://david-dm.org/hex7c0/remove_date)
[![Coveralls](https://img.shields.io/coveralls/hex7c0/remove_date.svg)](https://coveralls.io/r/hex7c0/remove_date)

Just a simple hack to remove [Date header](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Date) from HTTP(S) response.
Similar to [remove_connection](https://github.com/hex7c0/remove_connection/)

## Installation

Install through NPM

```bash
npm install remove_date
```
or
```bash
git clone git://github.com/hex7c0/remove_date.git
```

## API

inside nodejs project
```js
var setDate = require('remove_date');

require('http').createServer(function(req, res) {

  setDate(res); // remove Date header from response

  res.writeHead(200, {
    'Content-Type': 'text/plain'
  });
  res.end('Hello World\n');
}).listen(3000, '127.0.0.1');
```

as middleware
```js
var setDate = require('remove_date').setDateMiddleware;
var app = require('express')();

app.use(setDate()).get('/', function(req, res) {

  res.end('Hello World\n');
}).listen(3000, '127.0.0.1');
```

### setDate(res [, setHeader])

#### options

 - `res` - **Object** response to client *(default "required")*
 - `setHeader`- **Boolean** setHeader block *(default "optional")*

### setDateMiddleware([setHeader])

#### options

 - `setHeader`- **Boolean** setHeader block *(default "optional")*

## Examples

Take a look at my [examples](examples)

### [License GPLv3](LICENSE)

---
_Source: https://npm.io/package/remove_date · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
