We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dce9eb3 commit 8feaf5cCopy full SHA for 8feaf5c
api/src/security/api-keys.js
@@ -80,10 +80,10 @@ const validateKeys = (input) => {
80
}
81
82
if (details.allowedServices) {
83
- const isArray = Array.isArray(details.allowedServices);
84
-
85
- if (isArray) {
86
- const invalid_services = details.allowedServices.find(service => !env.allServices.has(service));
+ if (Array.isArray(details.allowedServices)) {
+ const invalid_services = details.allowedServices.some(
+ service => !env.allServices.has(service)
+ );
87
if (invalid_services) {
88
throw "`allowedServices` in details contains an invalid service";
89
0 commit comments