nestjs-fire
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Nestjs FireWall

FireWall guard with black or white list for NestJs.

Installation

Yarn

yarn add nestjs-fire

NPM

npm install nestjs-fire --save

Getting Started

import { Controller, Get, UseGuards } from '@nestjs/common'
import { IPs, WhiteListGuard, BlackListGuard } from 'nestjs-fire'
 
@IPs('127.0.0.1')
OR
@Hosts('www.xxx.com')
@UseGuards(BlackListGuard)
@Controller('')
export class TestController {
 
    @IPs('127.0.0.1')
    OR
    @Hosts('www.xxx.com')
    @UseGuards(BlackListGuard)
    @Get()
    root() {
        return xxx
    }
}

That's it!

Package Sidebar

Install

npm i nestjs-fire

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

14 kB

Total Files

40

Last publish

Collaborators

  • skunight