Commit ·
58e0fb5
1
Parent(s): adae8b1
update
Browse files
ndcc/server/plugins/rateLimit/index.js
CHANGED
|
@@ -9,7 +9,7 @@ exports.plugin = {
|
|
| 9 |
register: async function (server, options) {
|
| 10 |
const {requestsPerSecond} = server.settings.app.systemConfig.Config
|
| 11 |
|
| 12 |
-
//
|
| 13 |
await server.ext('onPreAuth', function (request, h) {
|
| 14 |
// if(request.route.path === "/api/{action*}"){
|
| 15 |
// // console.log(requestsPerSecond,'============')
|
|
|
|
| 9 |
register: async function (server, options) {
|
| 10 |
const {requestsPerSecond} = server.settings.app.systemConfig.Config
|
| 11 |
|
| 12 |
+
//基于hapi-rate-limit插件修改,See https://www.npmjs.com/package/rate-limit
|
| 13 |
await server.ext('onPreAuth', function (request, h) {
|
| 14 |
// if(request.route.path === "/api/{action*}"){
|
| 15 |
// // console.log(requestsPerSecond,'============')
|