fix: negative sentiment → neutral language (#39522)

The existing terminology carries negative sentiment that can be
interpreted in a racial or sense. Updating the name to have no
potential for such a connection.

Co-authored-by: Justin Rogers <justrog@gmail.com>
This commit is contained in:
Mrugesh Mohapatra
2020-09-07 11:04:44 +05:30
committed by GitHub
parent b93785be5d
commit c23c4ef8e4
13 changed files with 40 additions and 34 deletions

View File

@ -11,10 +11,10 @@ const pathsOfNoReturn = [
'css'
];
const pathsWhiteList = ['challenges', 'map', 'commit'];
const pathsAllowedList = ['challenges', 'map', 'commit'];
const pathsOfNoReturnRegex = new RegExp(pathsOfNoReturn.join('|'), 'i');
const whiteListRegex = new RegExp(pathsWhiteList.join('|'), 'i');
const pathsAllowedRegex = new RegExp(pathsAllowedList.join('|'), 'i');
export default function addReturnToUrl() {
return function(req, res, next) {
@ -24,7 +24,7 @@ export default function addReturnToUrl() {
if (
req.method !== 'GET' ||
pathsOfNoReturnRegex.test(path) ||
!whiteListRegex.test(path) ||
!pathsAllowedRegex.test(path) ||
/hot/i.test(req.path)
) {
return next();