feat: check for updates
This commit is contained in:
1 parent
959f2ebde1
commit
63c044a09b
13 files changed
+95
-15
No files matched your search
@@ -75,7 +75,7 @@ module.exports = {
|
||||
},
|
||||
async update(obj, args) {
|
||||
if(_.some(args.pageRules, pr => {
|
||||
return pr.match !== 'REGEX' || safeRegex(pr.path)
|
||||
return pr.match === 'REGEX' && !safeRegex(pr.path)
|
||||
})) {
|
||||
throw new gql.GraphQLError('Some Page Rules contains unsafe or exponential time regex.')
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user