Explorar o código

Merge pull request #131 from shane-holland/feature/allow_running_without_safe_browsing

Allows running without requiring Google Safe Browsing.
Pouria Ezzati %!s(int64=7) %!d(string=hai) anos
pai
achega
c38faf086e
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      server/server.js

+ 2 - 2
server/server.js

@@ -104,8 +104,8 @@ app.prepare().then(() => {
     auth.authJwtLoose,
     catchErrors(auth.recaptcha),
     catchErrors(validateUrl),
-    catchErrors(cooldownCheck),
-    catchErrors(malwareCheck),
+    /* Allows running without Google Safe Browsing enabled */
+    config.GOOGLE_SAFE_BROWSING_KEY ? [catchErrors(cooldownCheck), catchErrors(malwareCheck)] : [],
     catchErrors(url.urlShortener)
   );
   server.post('/api/url/deleteurl', auth.authApikey, auth.authJwt, catchErrors(url.deleteUrl));