www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 6fe0ea6a90e6b6a824502d766a4664855bbe7c36
parent 92378313f746461312370203b4689bb3e0ca1356
Author: Simon Kornblith <simon@simonster.com>
Date:   Thu,  1 Sep 2011 07:04:46 +0000

Fix conditional


Diffstat:
Mchrome/content/zotero/xpcom/server.js | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/server.js b/chrome/content/zotero/xpcom/server.js @@ -316,7 +316,7 @@ Zotero.Server.DataListener.prototype._processEndpoint = function(method, postDat var headers = ""; const originRe = /[\r\n]Origin: +([^ \r\n]+)/i; var m = originRe.exec(this.header); - if(m && m[1] === "https://www.zotero.org" || m[1] === "http://www.zotero.org") { Zotero.debug(m[1]); + if(m && (m[1] === "https://www.zotero.org" || m[1] === "http://www.zotero.org")) { headers += "Access-Control-Allow-Origin: "+m[1]+"\r\n"; headers += "Access-Control-Allow-Methods: POST, GET, OPTIONS\r\n"; headers += "Access-Control-Allow-Headers: Content-Type,X-Zotero-Connector-API-Version,X-Zotero-Version\r\n";