MCPcopy Create free account
hub / github.com/parse-community/parse-server / validateRouteAllowList

Method validateRouteAllowList

src/Config.js:820–837  ·  view source on GitHub ↗
(routeAllowList)

Source from the content-addressed store, hash-verified

818 }
819
820 static validateRouteAllowList(routeAllowList) {
821 if (routeAllowList === undefined || routeAllowList === null) {
822 return;
823 }
824 if (!Array.isArray(routeAllowList)) {
825 throw 'Parse Server option routeAllowList must be an array of strings.';
826 }
827 for (const pattern of routeAllowList) {
828 if (typeof pattern !== 'string') {
829 throw `Parse Server option routeAllowList contains a non-string value.`;
830 }
831 try {
832 new RegExp('^' + pattern + '$');
833 } catch {
834 throw `Parse Server option routeAllowList contains an invalid regex pattern: "${pattern}".`;
835 }
836 }
837 }
838
839 static validateRateLimit(rateLimit) {
840 if (!rateLimit) {

Callers 1

validateOptionsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected