Socket
Book a DemoInstallSign in
Socket

@maxdome/redis-flushdb

Package Overview
Dependencies
Maintainers
15
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@maxdome/redis-flushdb

## The controller

latest
npmnpm
Version
1.0.3
Version published
Maintainers
15
Created
Source

Usage

The controller

if (process.env.REDIS_FLUSHDB_SECRET) {
  app.post('/debug/redis-flushdb', require('@maxdome/redis-flushdb').controller({
    redis,
    secret: process.env.REDIS_FLUSHDB_SECRET,
  }));
}

Only the flushdb

require('@maxdome/redis-flushdb')({ redis });

Swagger

paths:
  /debug/redis-flushdb:
    post:
      summary: "Remove all key/value pairs from a redis database"
      parameters:
        - name: secret
          description: "Secret for the flushdb"
          in: query
          type: string
          required: true
        - name: db
          description: "Database which gets flushed (optional, default: the default connected one gets flushed)"
          in: query
          type: string
      responses:
        204:
          description: "OK"
        403:
          description: "Missing or incorrect secret"
        500:
          description: "Internal Server Error"

FAQs

Package last updated on 25 Feb 2019

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