changeset 18:f6db6f8cbf5b

added same-origin policy for now.
author Atul Varma <avarma@mozilla.com>
date Fri, 25 Jun 2010 11:43:51 -0700
parents 18d28e6a9887
children e1b3e9916b57
files static-files/index.js
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/static-files/index.js	Fri Jun 25 11:39:28 2010 -0700
+++ b/static-files/index.js	Fri Jun 25 11:43:51 2010 -0700
@@ -164,9 +164,13 @@
       }
     };
 
+    var myOrigin = window.location.protocol + "//" + window.location.host;
+
     function isOriginValid(origin) {
+      if (origin == myOrigin)
+        return true;
       // TODO: Finish this.
-      return true;
+      return false;
     }
 
     var server = new Summit.Server(handlers, isOriginValid);