|
@@ -31,6 +31,14 @@ app.use(bodyParser.urlencoded({ extended: true }));
|
31
|
31
|
app.use(bodyParser.json());
|
32
|
32
|
|
33
|
33
|
|
|
34
|
+// Allow cross-origin requests. Wildcard for now, we'll see if we can improve
|
|
35
|
+// that.
|
|
36
|
+app.all('/*', function(req, res, next) {
|
|
37
|
+ res.header('Access-Control-Allow-Origin', '*');
|
|
38
|
+ next();
|
|
39
|
+});
|
|
40
|
+
|
|
41
|
+
|
34
|
42
|
// A request on /register generates a token and store it, along the user's
|
35
|
43
|
// address, on the tokens object
|
36
|
44
|
app.get('/register', function(req, res, next) {
|