diff --git a/CHANGELOG.md b/CHANGELOG.md index 42fee8d6..a8495998 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. +### 4.7.0 (2024-05-10) + +**Feature** + +- Improve global throttler +- Improve global log interceptor format +- Upgrade dependencies + ### 4.4.0 (2023-10-09) **Breaking Change** diff --git a/package.json b/package.json index 9066e6a2..b0c610f7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nodepress", - "version": "4.6.2", + "version": "4.7.0", "description": "RESTful API service for Surmon.me blog", "author": "Surmon", "license": "MIT", diff --git a/src/app.module.ts b/src/app.module.ts index c8d675e4..5825f983 100755 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -48,9 +48,9 @@ import { VoteModule } from '@app/modules/vote/vote.module' limit: 600, // 600 limit ignoreUserAgents: [/googlebot/gi, /bingbot/gi, /baidubot/gi], skipIf: (context) => { - // Skip throttle for the front-end Server + // Skip throttle for the front-end server. const request = context.switchToHttp().getRequest() - // Work only for front-end applications running on the same host machine + // Work only for front-end applications running on the same host machine. return request.hostname === 'localhost' || ['127.0.0.1', '::1'].includes(request.ip) } }