From e81bb22565cf4cb117bcddf3bc290421e3cccbce Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 25 Apr 2013 04:47:42 -0400 Subject: [PATCH] added Access-Control-Allow-Origin header --- ChangeLog | 2 ++ lib/server/main.js | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 29624af4..f682129f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ * Changed jquery cdn to one with https suport jquery.com -> google cdn. +* Added Access-Control-Allow-Origin header. + 2012.04.22, v0.2.0 diff --git a/lib/server/main.js b/lib/server/main.js index 79c0cceb..dd900007 100644 --- a/lib/server/main.js +++ b/lib/server/main.js @@ -193,11 +193,11 @@ if( Util.isContainStr(p.query, 'download') ) lType = 'application/octet-stream'; - lRet = { - 'Content-Type': lType + lContentEncoding, - 'last-modified': new Date().toString(), - 'Vary': 'Accept-Encoding' + 'Access-Control-Allow-Origin' : '*', + 'Content-Type' : lType + lContentEncoding, + 'last-modified' : new Date().toString(), + 'Vary' : 'Accept-Encoding' }; if( !Util.strCmp(lExt, '.appcache') && p.cache)