Added Access-Control-Allow-Origin header
1 files changed, 3 insertions(+), 0 deletions(-)

M src/org/overchat/overham/Server.java
M src/org/overchat/overham/Server.java +3 -0
@@ 202,6 202,7 @@ public class Server {
 					res.raw().addHeader("Content-Type", methodMimeType);
 
 					if (CallStyle.LEGACY == moduleLookup(moduleName).getUserMethodCallStyle(methodName)) {
+						res.raw().addHeader("Access-Control-Allow-Origin", "*");
 						return moduleLookup(moduleName).callAndDecode(methodName, requestParams);
 					} else { // New style ReturnData (advanced processing)
 						int singleByte;

          
@@ 220,6 221,8 @@ public class Server {
 							res.raw().addHeader("Cache-Control", "no-cache");
 							res.raw().addHeader("MIME-Version", "1.0");
 							res.raw().addHeader("Content-Transfer-Encoding", "binary");
+						} else {
+							res.raw().addHeader("Access-Control-Allow-Origin", "*");
 						}
 
 						if (returnData.inputStream != null) {