Parcourir la source

Merge branch 'development'

pearlgw il y a 2 semaines
Parent
commit
ff6ceffd40
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      index.ts

+ 1 - 1
index.ts

@@ -26,7 +26,7 @@ const whitelist = [
26 26
 
27 27
 var corsOptions = {
28 28
     origin: function (origin: any, callback: any) {
29
-        if (whitelist.indexOf(origin) !== -1) {
29
+        if (!origin || whitelist.indexOf(origin) !== -1) {
30 30
             callback(null, true)
31 31
         } else {
32 32
             callback(new Error('Not allowed by CORS'))