Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-putin

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-putin

Express middleware to reject requests from all Russian IPs

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Weekly downloads
 
Created
Source

express-putin

Express middleware to reject requests from all Russian IPs.

Version License Node version Dependencies Build Test

Table of contents:

  • Usage
  • FAQ

Usage

Basic

import express from 'express';
import putin from 'express-putin';

const app = express();

app.use(putin());

Customize response body and/or status code

import express from 'express';
import putin from 'express-putin';

const HTTP_I_AM_A_TEAPOT = 418;

const app = express();

app.use(putin({
  body: 'Russia, please stop the war!',
  status: HTTP_I_AM_A_TEAPOT,
}));

FAQ

Using behind a reverse proxy

In order to retrieve a client IP address we use request-ip library. Please check its documentation and make sure that your reverse proxy passes at least one of required headers containing client's IP address.

Why did you name a package after a war criminal?

So that people never forget who is responsible for all this.

And because it's way more catchy than express-stop-russian-invasion-on-ukraine.


Other open-source projects to help Ukraine: https://github.com/petrussola/help-ukraine-open-source

Keywords

FAQs

Package last updated on 08 Mar 2022

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc