Skip to content

skunight/nestjs-fire

This branch is 1 commit ahead of master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d76d794 · Aug 11, 2021

History

5 Commits
Jun 25, 2019
Jun 25, 2019
Jun 25, 2019
Jun 25, 2019
Jun 25, 2019
Jun 25, 2019
Jun 25, 2019
Jun 25, 2019
Jun 25, 2019
Jun 25, 2019
Jun 25, 2019
Jun 25, 2019
Jun 25, 2019
Jun 25, 2019
Jun 25, 2019
Jun 25, 2019
Jun 25, 2019
Jun 25, 2019
Aug 11, 2021

Repository files navigation

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!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published