{"id":21905392,"url":"https://github.com/hex7c0/remove_connection","last_synced_at":"2026-04-15T14:02:17.081Z","repository":{"id":57353378,"uuid":"41326609","full_name":"hex7c0/remove_connection","owner":"hex7c0","description":"remove Connection header from http(s) response for Nodejs","archived":false,"fork":false,"pushed_at":"2024-04-23T00:05:42.000Z","size":89,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-01T12:19:34.372Z","etag":null,"topics":["nodejs"],"latest_commit_sha":null,"homepage":"https://github.com/hex7c0/remove_connection","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hex7c0.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2015-08-24T20:55:53.000Z","updated_at":"2017-12-29T15:23:06.000Z","dependencies_parsed_at":"2024-04-23T01:30:43.366Z","dependency_job_id":"513333f8-6624-4b2e-b639-43f980684d1b","html_url":"https://github.com/hex7c0/remove_connection","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex7c0%2Fremove_connection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex7c0%2Fremove_connection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex7c0%2Fremove_connection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex7c0%2Fremove_connection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hex7c0","download_url":"https://codeload.github.com/hex7c0/remove_connection/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244918710,"owners_count":20531686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nodejs"],"created_at":"2024-11-28T16:33:08.905Z","updated_at":"2026-04-15T14:02:16.973Z","avatar_url":"https://github.com/hex7c0.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [remove_connection](https://github.com/hex7c0/remove_connection)\n\n[![NPM version](https://img.shields.io/npm/v/remove_connection.svg)](https://www.npmjs.com/package/remove_connection)\n[![Linux Status](https://img.shields.io/travis/hex7c0/remove_connection.svg?label=linux-osx)](https://travis-ci.org/hex7c0/remove_connection)\n[![Windows Status](https://img.shields.io/appveyor/ci/hex7c0/remove_connection.svg?label=windows)](https://ci.appveyor.com/project/hex7c0/remove_connection)\n[![Dependency Status](https://img.shields.io/david/hex7c0/remove_connection.svg)](https://david-dm.org/hex7c0/remove_connection)\n[![Coveralls](https://img.shields.io/coveralls/hex7c0/remove_connection.svg)](https://coveralls.io/r/hex7c0/remove_connection)\n\nJust a simple hack to remove [Connection header](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Connection) from HTTP(S) response.\nSimilar to [remove_date](https://github.com/hex7c0/remove_date/)\n\n## Installation\n\nInstall through NPM\n\n```bash\nnpm install remove_connection\n```\nor\n```bash\ngit clone git://github.com/hex7c0/remove_connection.git\n```\n\n## API\n\ninside nodejs project\n```js\nvar setConnection = require('remove_connection');\n\nrequire('http').createServer(function(req, res) {\n\n  setConnection(res); // remove Connection header from response\n\n  res.writeHead(200, {\n    'Content-Type': 'text/plain'\n  });\n  res.end('Hello World\\n');\n}).listen(3000, '127.0.0.1');\n```\n\nas middleware\n```js\nvar setConnection = require('remove_connection').setConnectionMiddleware;\nvar app = require('express')();\n\napp.use(setConnection()).get('/', function(req, res) {\n\n  res.end('Hello World\\n');\n}).listen(3000, '127.0.0.1');\n```\n\n### setConnection(res [, setHeader])\n\n#### options\n\n - `res` - **Object** response to client *(default \"required\")*\n - `setHeader`- **Boolean** setHeader block *(default \"optional\")*\n\n### setConnectionMiddleware([setHeader])\n\n#### options\n\n - `setHeader`- **Boolean** setHeader block *(default \"optional\")*\n\n## Examples\n\nTake a look at my [examples](examples)\n\n### [License GPLv3](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhex7c0%2Fremove_connection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhex7c0%2Fremove_connection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhex7c0%2Fremove_connection/lists"}