mirror of
https://github.com/strapi/strapi.git
synced 2025-09-01 04:42:58 +00:00
handle cleanup of trailing /
This commit is contained in:
parent
ed364d951a
commit
e8231bbca2
@ -24,7 +24,13 @@ module.exports =
|
||||
const rateLimit = require('koa2-ratelimit').RateLimit;
|
||||
|
||||
const userEmail = toLower(ctx.request.body.email) || 'unknownEmail';
|
||||
const requestPath = toLower(ctx.request.path) || 'unknownPath';
|
||||
let requestPath = toLower(ctx.request.path) || 'unknownPath';
|
||||
|
||||
if (requestPath.endsWith('/')) {
|
||||
if (requestPath !== '/') {
|
||||
requestPath = requestPath.slice(0, -1);
|
||||
}
|
||||
}
|
||||
|
||||
const loadConfig = {
|
||||
interval: { min: 5 },
|
||||
|
@ -24,7 +24,13 @@ module.exports =
|
||||
const rateLimit = require('koa2-ratelimit').RateLimit;
|
||||
|
||||
const userIdentifier = toLower(ctx.request.body.email) || 'unknownIdentifier';
|
||||
const requestPath = toLower(ctx.request.path) || 'unknownPath';
|
||||
let requestPath = toLower(ctx.request.path) || 'unknownPath';
|
||||
|
||||
if (requestPath.endsWith('/')) {
|
||||
if (requestPath !== '/') {
|
||||
requestPath = requestPath.slice(0, -1);
|
||||
}
|
||||
}
|
||||
|
||||
const loadConfig = {
|
||||
interval: { min: 5 },
|
||||
|
Loading…
x
Reference in New Issue
Block a user