user-agent-middleware
v1.0.3
Published
Middleware for checking User-Agent header in NestJS
Downloads
4
Maintainers
Readme
user-agent-middleware
Middleware for checking User-Agent header in NestJS.
Installation
npm install user-agent-middleware
Add the middleware to your NestJS project:
import { UserAgentMiddleware } from 'user-agent-middleware';
@Module({
imports: [],
controllers: [AppController],
providers: [AppService],
})
export class AppModule {
configure(consumer: MiddlewareConsumer) {
consumer
.apply(UserAgentMiddleware)
.forRoutes({ path: '*', method: RequestMethod.ALL });
}
}