From 286cf0b405d3269e7ba9ff6f1cccd51738c7f587 Mon Sep 17 00:00:00 2001 From: Julian Steinwachs Date: Tue, 7 Apr 2015 03:44:11 -0400 Subject: [PATCH 1/2] enabled CORS --- twister-proxy.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/twister-proxy.js b/twister-proxy.js index f3a6fed..c87b8e6 100644 --- a/twister-proxy.js +++ b/twister-proxy.js @@ -5,6 +5,7 @@ var express = require("express"); var console = require("console"); var app = express(); +var cors = require('cors'); try { @@ -73,6 +74,8 @@ CounterInstance = function() require("log-timestamp"); +app.use(cors()); + app.get("*", function(request, response) { if(settings.Server.enable_https&&request.protocol=="http") From a182a3924181d93b92fb6be2b151f28cf82a340a Mon Sep 17 00:00:00 2001 From: Julian Steinwachs Date: Tue, 7 Apr 2015 04:05:02 -0400 Subject: [PATCH 2/2] added cors to package.json --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 0207b7e..6497ab1 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "dependencies": { "express": ">=2.5.x", + "cors": "*", "log-timestamp": ">=0.1.1" }, "repository": {